httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Onno Bosch" <t...@skipass.com>
Subject Re: mod_rewrite better for this?
Date Thu, 06 Dec 2001 22:34:56 GMT
Hi,

I'm being a newbee to Apache, but to me the solution seems very simple.

Just define the virtualhost container as follows:

<VirtualHost 10.1.1.31>
    ServerAdmin webmaster@domain.com
    DocumentRoot /net/www/public_html/www
    ServerName www.domain.com
    ServerAlias domain.com
    ScriptAlias /cgi-bin/ /net/www/public_html/cgi-bin/
    ErrorLog /net/www/public_html/logs/http.err
    CustomLog /net/www/public_html/logs/access.log combined
</VirtualHost>

Please notice the ServerAlias directive. This makes your second container
(the one redirecting the URL without www. to the www.domain.com server)
needless.
The same idea works fine for me on a server I'm currently working on...

Onno

> I have two virtual host domains.  One redirects to the other, and both
> are available with and without the www. in front of the domain name.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message