Re: Port-based vhosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, Mar 11, 2009 at 4:35 AM, Charles Sprickman <spork@xxxxxxxx> 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@xxxxxxxxx
krist@xxxxxxxxxxxxx
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?

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux