You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by dg...@hyperreal.org on 1997/11/09 10:44:47 UTC
Re: general/704: VirtualHost relative paths are being over-ridden by global Alias paths
Synopsis: VirtualHost relative paths are being over-ridden by global Alias paths
State-Changed-From-To: feedback-closed
State-Changed-By: dgaudet
State-Changed-When: Sun Nov 9 01:44:47 PST 1997
State-Changed-Why:
Sorry I took so long to close this one out. Apache is behaving
correctly.
<img src="images/foo.gif"> is a relative URL which the client
translates into an absolute URL before sending the request to
the server. Suppose this tag is embedded in a page at
http://www.vhost.com/index.html. In that case, the relative
"images/foo.gif" is mapped to the absolute
"http://www.vhost.com/images/foo.gif".
This results in the URI "/images/foo.gif", which is properly
Aliased by your global Alias directive.
i.e. in this case <img src="/images/foo.gif"> and
<img src="images/foo.gif"> refer to the exact same object.
Regarding your other example, in ~userdir situations, the
relative URL "images/foo.gif" refers to the absolute URI
"/~userdir/images/foo.gif" which is definately different
than "/images/foo.gif".
Your only options are to not use "images" URIs in vhosts,
or to remove the global Alias /images.
Dean