httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] Port-based vhosts
Date Wed, 11 Mar 2009 08:33:17 GMT
On Wed, Mar 11, 2009 at 4:35 AM, Charles Sprickman <spork@bway.net> wrote:

>
> OK.  That makes perfect sense.  At this point, my main concern is actually
> understanding how this works.  When I was reading the docs on
> "UseCanonicalName" (
> http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalname) I noticed
> that reference is made to "self-referential" URLs.  Under what conditions
> does Apache then get involved and alter the URL?  Just redirects?  I
> understand a common redirect is just adding a trailing slash when the user
> does not supply it.  What are some other common cases? Who's call is it when
> a simple static site uses non-absolute URLs for all the links?  Is the
> browser building the fully-qualified links or apache (I suspect the former)?



Apache only gets involved in URLs it generates itself.

What is often misunderstood is the nature of what is in the address bar of
the browser. The address bar contains what the browser requested.  It cannot
be changed by the content of a webserver's response other than when the
response is "retry the request with this URL in stead". So the only way to
change the adres bar to change is to send a redirect.
There are a few cases where Apache will do this for you automatically. One
such case is when a user requests a directory, and apache generates a
directory index. This is the case that is mentioned in the docs you found.
However, in this case you will need to force a redirect yourself.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

Mime
View raw message