On Sun, 2005-09-11 at 21:38 +0200, Marco wrote:
> Hi,
> I have a problem with apache2 and rewrite module.
>
> VirtualHost for site www.domain1.com
> ...
> RewriteCond %{HTTP_HOST} !^www\.domain1\.com [NC]
> RewriteCond %{HTTP_HOST} !^$
> RewriteRule ^/(.*) http://www.domain1.com/$1 [L,R]
>
> TEST OK. http://domain1.com --> http://www.domain1.com
>
> When I make the virtual host for site www.domain2.com
> I have problems.
>
> VirtualHost for site www.domain2.com
> ...
> RewriteCond %{HTTP_HOST} !^www\.domain2\.com [NC]
> RewriteCond %{HTTP_HOST} !^$
> RewriteRule ^/(.*) http://www.domain2.com/$1 [L,R]
>
> TEST PROBLEM: http://domain2.com --> http://www.domain1.com
>
> Could you help me?
> Thanks
> Perhaps I don't understand exactly what you want to do..but wouldnt it be much easier to add a ServerAlias to the vitualhost config? <VirtualHost 1.2.3.4> ServerName domain1.com ServerAlias www.domain1.com ... </VirtualHost> -davidc -- gpg-key: http://www.zettazebra.com/files/key.gpg
signature.asc
Description: This is a digitally signed message part

