httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: Question...
Date Fri, 15 Mar 2002 23:49:54 GMT
Daniel Abad wrote:

> I´m trying to configure Virtual Hosts using mod_rewrite, but I need to
> redirect all URLs to my domain, like this:
> ->>
> Take a look:
> RewriteEngine on
> RewriteCond %{HTTP_HOST}        !.*\.mydomain\.com\.br.*
> RewriteRule ^(.*)               http://%{HTTP_HOST}$1 [R]
> VirtualDocumentRoot /path/vhosts/%1.1/%1.2/%1/htdocs

I do believe I've seen this question before....

It is hard to tell what you are trying to do, especially since you are 
mixing mod_vhost_alias and mod_rewrite, but here is a guess at the 
mod_rewrite part:

RewriteEngine on
RewriteCond %{HTTP_HOST}  !mydomain\.com\.br [NC]
RewriteCond %{HTTP_HOST}  www\.(.*)\.com\.br [NC]
RewriteRule ^(.*)$1 [R]


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

View raw message