Forum Moderators: open

Message Too Old, No Replies

Relative links: works different on different broswer

         

lucasa77

3:33 pm on Oct 30, 2004 (gmt 0)

10+ Year Member



Hello

I'm working on a website but i've a problem with relative links.
Let's say we have a website WWW.QWERTY.COM
There the pages
WWW.QWERTY.COM/INDEX.HTML
WWW.QWERTY.COM/A.HTML
WWW.QWERTY.COM/X/B.HTML
WWW.QWERTY.COM/Y/C.HTML

INDEX.HTML is a frame page. In one of the frame i load alternatively A B or C.HTML

The problems came out when i load (for example) B.HTML from a relative link in C.HTML. ("X/B.HTML")
IE no problem
Opera e Firefox: page not found.

The status bar say: WWW.QWERTY.COM/Y/X/B.HTML but IE find the correct page. The others two broswer no!

Can anybody provide a solution?

encyclo

4:00 pm on Oct 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], lucasa77.

When you've got path problems, especially with framed pages, one good way of sorting it out is to use a

base
tag in the
head
section of each page:

<base href="http://www.example.com/">

This will make all the internal links relative to that base page rather than the precise directory the file resides in.

Saltminer

12:58 am on Oct 31, 2004 (gmt 0)

10+ Year Member



From C.HTML the relative path to B.HTML would be "../X/B.HTML"

Jimmy

lucasa77

9:28 am on Oct 31, 2004 (gmt 0)

10+ Year Member



Thank You for your help.

Luca