Page 1 of 1

base href [SOLVED]

Posted: Sun Jun 04, 2006 5:21 am
by s.dot
I am using an apache mod rewrite to redirect mydomain.com/photos/ to albums.php

To avoid browsers thinking that all the links on that page should be in the directory /photos/page.php, rather then where they actually are /page.php, i've used the base tag.

Code: Select all

<base href="http://www.mydomain.com/">
This is working fine for me and anyone else i've asked except one person. It's really confusing me. His page is displaying everything as if it were in the /photos/ directory.

He is using avant browser (but also tried on IE) and windows XP operating system.

I've asked him to clear his cache and history and yadda yadda, but no luck. It's still doing it to him.

Anyone know why this could be?

Posted: Mon Jun 05, 2006 12:26 am
by s.dot
base tag in the body seemed to work for mostly everyone. but putting it in the <head> (where it should be) made it truely work for everyone.

Posted: Mon Jun 05, 2006 1:33 am
by Christopher
Yes, the base tag needs to me in the head to work everywhere. I have recently been using a BASE template tag in all my templates and have my Response class post process it to replace it everywhere in the final output. That way I can not only use it in the base tag in the head but in all URLs.