httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <>
Subject Re: [users@httpd] Wildcards in Name-based Virtual Hosts
Date Thu, 17 Jun 2004 09:11:53 GMT
James Tusini wrote:
> I just want to make sure that both and
> is handled by the same VirtualHost.

I always recommend redirecting to the "correct" hostname. To only have a
single canonical hostname for your site's contents, is good for many

What I have for each of my VHosts:

    <VirtualHost *>
        ServerName  www.domain.tld
        # other stuff for the real host

    <VirtualHost *>
        ServerName domain.tld
        ServerAlias *.domain.tld
        RedirectPermanent / http://www.domain.tld/

You could achieve the same effect in other ways, but this is clear and

Robert Andersson

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