Forum Moderators: phranque

Message Too Old, No Replies

href base not working in IE 7 Windows XP / Vista

         

ro1960

10:49 am on Sep 21, 2008 (gmt 0)

10+ Year Member



This question is in relation with this thread:
[webmasterworld.com...]

It seems that the <base href="http://www.example.com"> trick is not correctly interpreted by IE 7 Windows XP / Vista.

If you are on a page in this format:

http://www.example.com/news/123456

and then you click on another link like thispage.php, you are taken to:

http://www.example.com/news/thispage.php

instead of

http://www.example.com/thispage.php

A problem that doesn't occur under Firefox or Safari.

[edited by: jdMorgan at 2:25 pm (utc) on Sep. 21, 2008]
[edit reason] example.com [/edit]

g1smd

11:07 am on Sep 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's nasty.

From memory, I think I usually include the trailing slash for pages that are the bare domain name or a bare folder.

jdMorgan

2:25 pm on Sep 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree -- Try the trailing slash.

I'd also advise not to depend on such client-side 'fixes'. Link to the correct canonical or server-relative URL so that you don't depend on the browser (or robot) to fix your links.

To be clear, link to "http://www.example.com/thispage.php" or to "/thispage.php" instead of linking to "thispage.php"

Jim

ro1960

2:49 pm on Sep 21, 2008 (gmt 0)

10+ Year Member



I had the trailing slash before and it doesn't make a difference. The problem only happens with menu items which are generated by a javascript include located in /nlsmenu/lib/. So adding a LEADING slash to my links in this menu like /thispage.php solved the problem. Thanks for your help on that.

g1smd

3:36 pm on Sep 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ah, if there was no trailing / on the base tag URL, <b>and</b> no leading / on the local path name, then I could see that going very wrong on you.

ro1960

6:50 pm on Sep 21, 2008 (gmt 0)

10+ Year Member



Could you please elaborate? I am very curious to know what you mean.