httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan McDonald <mute...@yahoo.com>
Subject [users@httpd] relative links get broken when adding vhost
Date Mon, 02 Apr 2007 17:49:56 GMT
Hi,

I work at a large University and im stuck on this
apache problem. Its best explained with an example:

I have a website at
www.domain.edu/dept/sci/bio/frogs/green/poison and the
index.html file has links like ../../frogs/eyes.gif 
/style/style.css ../../../images/icon.jpg and
images/wart.jpg

User wants biofrogs.domain.edu subdomain, and would
like it pointed to the
/dept/sci/bio/frogs/green/poison directory. A
VirtualHost entry makes that the new top level
directory. 

Now there's problems.
biofrogs.domain.edu/style/style.css and
www.domain.edu/style/style.css are pointing to
completely different files. ../../../images/icon.jpg
wouldnt even be accessible on the subdomain unless you
use a absolute link etc etc. Because the DocumentRoot
changed obviously all these relative links are broken.


Is there a way to fix this other than writing the
html, or making symlinks in the new DocRoot? I really
wanted mod_rewrite to match a "../../file" request,
but it just matches the file it points to. 

Any ideas would be great! 

Thanks
Dan


 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message