The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Problem with base tag using relative url
tleave2000
post Feb 23 2007, 07:39 PM
Post #1





Group: Members
Posts: 8
Joined: 23-February 07
Member No.: 2,007



I read here 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: my proto website. There's a little more explanation there.

Hope you can help.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 23 2007, 07:53 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tleave2000
post Feb 23 2007, 08:21 PM
Post #3





Group: Members
Posts: 8
Joined: 23-February 07
Member No.: 2,007



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.

This post has been edited by tleave2000: Feb 23 2007, 08:23 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 05:19 PM