Reputation: 14398
I'm starting to create websites with admin areas in different directories. So I'm starting to use the HTML base tag to tell the browser the base location for relative paths to start at. It seems to work great for everything except one thing.
My problem is that when I do this:
<base href="http://localhost/testsite/">
...
<a href="/">Link to home</a>
That link doesn't take me to my testsite index.html page, it takes me to the localhost directory tree. Am I doing something wrong here?
Upvotes: 0
Views: 197
Reputation: 700342
You are not using a relative path there, it's an absolute path. The relative path to the current folder would be a single period:
<a href=".">Link to home</a>
Upvotes: 1