httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nala Gnirut <>
Subject Re: [users@httpd] Issue with trailing slashes after rewrite
Date Sun, 18 Mar 2012 22:36:33 GMT
On Sun, Mar 18, 2012 at 11:16 PM, Eric Covener <> wrote:

> The P flag is explicitly used to proxy. If you want to redirect,
> substitute a full URL and use the R flag instead.

I need to dynamically change DocumentRoot for some subdomains pointing to
the same local path.

This rule works (almost) as expected, but has an issue with links to
subfolders without trailing slash:

RewriteCond %{HTTP_HOST} ^foo\.domain\.com$
RewriteRule .* /foo%{REQUEST_URI}  [QSA,L]

That is works, while is redirected to a wrong local path (/foo/foo/bar
instead of /foo/bar)

View raw message