relative links get broken when adding vhost

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

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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