httpd-users mailing list archives

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

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

I have a website at and the
index.html file has links like ../../frogs/eyes.gif 
/style/style.css ../../../images/icon.jpg and

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

Now there's problems. and 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! 


We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message