Re: [users@httpd] Issue with trailing slashes after rewrite

2012-03-19 Thread Nala Gnirut
eRule [^/]$ %{REQUEST_URI}/ [R=301,L] # Change DocumentRoot for foo.mydomain.com RewriteCond %{HTTP_HOST} ^foo\.mydomain\.com$ RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule .* /foo%{REQUEST_URI} [QSA,L] * * * Thanks everyone for your help. On Sun, Mar 18, 2012 at 11:36 PM, Nala Gnirut wrote: >

Re: [users@httpd] Issue with trailing slashes after rewrite

2012-03-18 Thread Nala Gnirut
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)

Re: [users@httpd] Issue with trailing slashes after rewrite

2012-03-18 Thread Nala Gnirut
After adapting to my folder structure it should look like RewriteCond %{HTTP_HOST} ^(.*)\.(.*)\.(.*)$ RewriteRule ^/(.*) /%1/$1 [P] Unfortunately neither your original suggestion nor my version seem to cause any redirection. On Sat, Mar 17, 2012 at 3:09 PM, Igor Cicimov wrote: > Correction > >

Re: [users@httpd] Issue with trailing slashes after rewrite

2012-03-17 Thread Nala Gnirut
ot; >> >> so by using QSA you are modifying the query string adding another foo to >> it thus the result you are seeing. >> >> Finally, your rules should look like: >> >> RewriteCond %{HTTP_HOST} ^foo\.mydomain\.com$ <http://foo.mydomain.com/> >> &