httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Global Vhost/Redirect
Date Fri, 18 May 2007 18:59:10 GMT
On 5/18/07, Scott Wilcox <sc0tt@x0f.org> wrote:
>
>  Hey Joshua,
>
>  I think I was a little ambiguous with what I said. It probably would of
> been better to explain it like this.
>
>  If a VirtualHost is there for the requested URI, that is served.
>  For any requested URI (http://test1.com, http://sub.domain.com,
> http://anything.anythingelse.anywhere.tld), then that
> request is actually forwarded to the main site.
>
>  At the moment, my first VirtualHost is catching everything and displaying
> the standard homepage fine, but i'd much prefer if they were pushed over to
> the correct URI.

Did you read the link I sent? That is exactly what it does.

As it says, the first <VirtualHost> is the default host which catches
all names that don't match any other virtualhost. Put a Redirect in
that host pointing to your "canonical" vhost (the "correct URI"),
which should be contained in a separate <VirtualHost> section.

Joshua.

---------------------------------------------------------------------
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