Editorial question84.6K views2,859 votes0 answers1,443 following
AI-generatedWhy do relative mod_rewrite substitutions redirect differently behind a production reverse proxy than on localhost?
I have a set of mod_rewrite rules in a VirtualHost on Apache httpd 2.4 that use relative substitutions, for example a pattern like ^(.*)$ /app/$1 . On my local machine, where the site is served directly from its DocumentRoot, the rewritten URLs resolve exactly as expected. In production the same configuration sits behind a reverse proxy, and the rewritten ta