httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Spinassi <>
Subject Re: [users@httpd] apache redirection does not work
Date Thu, 01 Oct 2009 21:06:42 GMT
On Thu, 2009-10-01 at 11:53 -0400, Sharjeel Tariq wrote:
> Hi,
> I am trying to set up apache redirection rule for redirecting all of
> our non
> 'www' domains to 'www' domains. I got the redirection rule from apache
> manual
> but the rule does not work when we have subdirectories and parameters
> at the
> end of url.
> The redirection rule i have is 
> RewriteCond %{HTTP_HOST} ^$
> RewriteRule ^/(.*)$$1 [L,R]


I know it's not what you are asking for, but may accomplish your task.

You can try adding a ServerAlias to the VirtualHost:


Here is the documentation at apache site:

Sorry if it's not what you are asking for, but it's pretty much waht I'd
do. With a simple script you can manage to add the ServerAlias to all
the VirtualHosts.



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message