httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject Re: No HOST header solutions?
Date Wed, 29 May 1996 21:15:55 GMT
On Wed, 29 May 1996, Robert S. Thau wrote:

> The idea basically is to give each page two names, one of which is
> unique server-wide and can therefore be used even by old browsers.
> Unfortunately, this has a whole bunch of nasty consequences --- for
> one, it's likely that crawlers that aren't savvy to what's going on
> (which is probably most, given that the protocol doesn't presently
> give them sufficient information to figure it out without a whole lot
> of back-end inference) will wind up indexing every single page twice,
> once under each name.

Possibly true. But then, even without all this, I often end up with
the same page two or three times when I do a search... mirrors do the
exact smae thing.

> Another bit of nastiness is that you've got to be very careful to use
> relative URIs for *everything*, or nasty errors start creeping in.

Not neccessarily. See below:

> (Of course, if you arrange things so that those prefixes are present
> and required even if you *supply* the Host: header, and do a redirect
> to if a direct request for
> itself comes in, then both problems go away).

Actually... note that, due to the way mod_alias works, Aliases are
passed on to virtual hosts, unless overrided. So look at the solution I

Alias /apache /usr/web/apache
DocumentRoot /usr/web/apache

What this means is that, predictably, a file at
/usr/web/apache/foo.html can be accessed as if the browser sends a Host: header,
but can be accessed with
regardless of whether or not it does send it, because the Alias
applies to both the main and "virtual" hosts.

So as long as you make sure to use and not, you can use all the non-relative links
you want.

> Hmmm... in search of a simple answer...

There isn't one. The best I can come up with is to go back in time
to five years ago and convince whomever designed the HTTP 1.0 spec
that they should require full URLs in all requests. That seems to be
the most elegant solution.

Alexei Kosut <>      The Apache HTTP Server
      "War does not determine who is right, only who is left."

View raw message