Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Problem with base tag using relative url

Posted by: tleave2000 Feb 23 2007, 07:39 PM

I read http://www.devguru.com/Technologies/xhtml/quickref/xhtml_base.html that you can use a relative address for the base address for resolving URLs on a page. That's exactly what I want, but I can't get my relative base URL to be recognised.

I can get an absolute base url to work, but that's really not what I want, because it would mean I had to change all the base tags when I wanted to edit my website off line on my computer.

Here's a link to the pages where I'm having the problem: http://www.tobs.me.uk. There's a little more explanation there.

Hope you can help.

Posted by: Christian J Feb 23 2007, 07:53 PM

According to http://www.w3.org/TR/html401/struct/links.html#edef-BASE the HREF attribute requires an absolute URI.

Why not use the "../" in the actual links instead when necessary?

Posted by: tleave2000 Feb 23 2007, 08:21 PM

Ah thanks for pointing me at that reference.

QUOTE(Christian J @ Feb 24 2007, 12:53 AM) *

Why not use the "../" in the actual links instead when necessary?

If I could have used a relative address for the base, then I could have reused the same basic page with the same site navigation links and just added an extra ../ to the base address whenever I wanted to make a page in a subdirectory. Without relative base address I'll have to add the ../ to every link on the page. I was hoping to avoid typing time + typos.

Thanks again for the advice.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)