Thread: Base Href
View Single Post
  #3 (permalink)  
Old 04-08-2006, 10:07 AM
computergenius computergenius is offline
WebProWorld Veteran
 
Join Date: Jul 2003
Location: Spain
Posts: 343
computergenius RepRank 1
Default Re: base href

Quote:
Originally Posted by dean
They're not ignoring the base href, you need to go up one level. You could try the unix shorthand with the 2 periods. In http://mydomain.com/x your relative link to Y.php would be ../Y.php
In other words, your base href is appended to the current directory, X. A relative link in X would be appended to the base href + the current directory, thus http://mydomain.com/X/Y.php. If Y.php was inside X, everything would be fine, but if it is in mydomain.com along with X and others, you need to go up one level.
I am not sure that I understand what you mean by "go up a level" - you mean that I should change my base ref to something else, or I should change my link which leads to Y.php?

I can't see what I would change base href to, and if I change the link to Y.php to be "../y.php" - then why am I using base href?? Needless to say, this is a simplification, there are other links, which need to be relative to current page.

So, I hesitate to disagree with you, when I can't get it working fully myself, but I don't believe that the base href is added to the current directory. I believe that the base href totally ignores the current directory.

I have changed the base href to be the 'real name' of the first file, so that it is now http://www.mydomain.com/thispage.php
- and I haven't had any errors in the last 24 hours! But could just be co-incidence.
Reply With Quote