Skip to content

Fix broken CSS/links when an app is reverse-proxied under a sub-folder — by HBruijn on Server Fault

advancedforumCC BY-SA (Stack Exchange; version depends on post date)

Proxies rewrite headers such as redirects, but not the links inside the page, so an app that uses absolute paths (/css/style.css) breaks under /subfolder/. The answer lists the real options: make the app use relative paths, deploy it under the same sub-folder internally, or rewrite page content with a filter module as a last resort.

Read the full thread on serverfault.com

Source: Fix broken CSS/links when an app is reverse-proxied under a sub-folder by HBruijn on Server Fault. Licence: CC BY-SA (Stack Exchange; version depends on post date).

Source reviewed
2026-11-02
Link checked
Not yet
Tested hands-on
Not by Oddbyte.Me

reverse proxyapachenginxsubdirectoryrelative urls

More in Community Answers (Stack Exchange)