mrc has asked for the wisdom of the Perl Monks concerning the following question:
RewriteCond %{HTTP_HOST} \.([^.]+\.[^.]+\.[^.]+)$ will redirect http://www.subdomain.domain.com to http://subdomain.domain.com, but I want the reverse. http://subdomain.domain.com redirected to http://www.subdomain.domain.com and 'www' url to remain unchanged.RewriteEngine On RewriteCond %{HTTP_HOST} \.([^.]+\.[^.]+\.[^.]+)$ RewriteRule ^(.*) http://%1$1 [R,L] VirtualDocumentRoot /home/user/%0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (OT) mod_rewrite anyone?
by merlyn (Sage) on Sep 26, 2009 at 16:02 UTC | |
by mrc (Sexton) on Sep 26, 2009 at 16:38 UTC | |
|
Re: (OT) mod_rewrite anyone?
by clinton (Priest) on Sep 26, 2009 at 11:02 UTC | |
by mrc (Sexton) on Sep 26, 2009 at 14:19 UTC | |
| |
|
Re: (OT) mod_rewrite anyone?
by moritz (Cardinal) on Sep 26, 2009 at 11:02 UTC | |
by mrc (Sexton) on Sep 26, 2009 at 14:11 UTC | |
by moritz (Cardinal) on Sep 26, 2009 at 14:16 UTC | |
by mrc (Sexton) on Sep 26, 2009 at 14:28 UTC | |
by moritz (Cardinal) on Sep 26, 2009 at 15:39 UTC |