02-08-05 10:49 PM
[jtelep wrote in comp.infosystems.www.servers.unix]
> I've just set up my first virtual host entries on my web server and
> they are working great but I have noticed a rather annoying problem
> that I hope someone can shed some light on. I see that my web server
> will respond to any host for my domain (existing or not) and I know
> that your first vhost entry is your default entry (i.e. any time a host
> is requested that isn't in the virtual host list this is the location
> that the page is served from).
[...snip 'how do I stop this' request]
When I want something similar to happen (I want fotoserve.net and .co.uk
to both point to the main site, but always want the uri to have the
fotoserve.*com* domain in it for cookie purposes), I create a different
'first' virual host, which defines the behaviour of what to do when
none of the other virtual hosts pick up the requests.
So the first <VirtualHost> entry is a catch-all which bounces people to
another site on the box (using a 301, although you could setup a few
pages to produce a 'no such site here' message or similar.)
Hope this helps.
--
http://fotoserve.com/ - Prints, Slides, Posters, Mugs, T-shirts,,
Calendars, Jigsaws, Tableware, Caricatures, Greetings cards, Picture
bags, Photo Album and Book covers, Canvas Prints, tissues and more
.... from your own digital images.
[ Post a follow-up to this message ]
|