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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link to parent folder

Status
Not open for further replies.

gwar2k1

Programmer
Apr 17, 2003
387
GB
Is there a way I can link to the parent folder without using the absolute url?

mysite.com / images
mysite.com / special / page.html

Using the above map is it possible to put an image on page.html without using src="mysite.com/image/image.png"? eg src="..images/image.png"?

TIA

~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
 
seriously? lol thanks

~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
 
The BEST way to do it, though, is

src="/images/some.img"

The leading slash means it'll pick a directory relative to the website's root directory. The benefit over the ".." approach is that if you move page.html to some other directory deeper in the tree, you won't have to change the links.

See my post halfway down thread253-720830 for more notes on linking to other directories.

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top