httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] mod_rewrite[SOLVED]
Date Wed, 01 Sep 2004 09:14:14 GMT
Joseph A. Nagy, Jr wrote:
> I have (temporarily) joseph-a-nagy-jr.homelinux.org as a ServerAlias of
> www.joseph-a-nagy-jr.us because they are indeed the same site, why have
> two different virtual host containers (e.g. twice the work)? Thanks for
the
> tip though, I know it'll come in handy eventually (I run several sites
from
> my server).

It is generally good to not have several URIs for the same resource(s).
That's why I think it is good to make a redirect from the alias to the
canonical hostname. To have two VHosts for each real host isn't really a
problem unless you run thousands of sites; it is simpler and faster than
involving mod_rewrite.

For each regular site I host, I use this scheme:

    <VirtualHost *>
        ServerName www.domain.ltd
        ...
    </VirtualHost>
    <VirtualHost *>
        ServerName domain.ltd
        ServerAlias *.domain.ltd
        Redirect http://www.domain.ltd
    </VirtualHost>

Regards,
Robert Andersson


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message