Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Site Root relative links

Status
Not open for further replies.

ice78991

Programmer
Nov 20, 2006
216
Site Root relative links not working on my local testing server

I'm sure this must be simple. I've set up my testing server correctly ( I think ) but when I use the following link

<a href="/archive.html">Archive</a>

it tries to link to the following and I get nothing


file:///archive.htm


What's wrong ?
 
If archive.html is in the current directory:
<a href="archive.html">Archive</a> (no slash)

If archive.html is in the root directory:
<a href="../archive.html">Archive</a> (dot dot slash)

If archive.html is up one level:
<a href="./archive.html">Archive</a> (dot slash)

If archive.html is down one directory:
<a href="yourdirectory/archive.html">Archive</a> (directory slash)

see: Relative URLs for a pretty complete explanation.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top