What does <a href="../../../../../"> Indicate?

44blackhatters

Registered Member
Joined
Jan 21, 2008
Messages
52
Reaction score
3
Hey --

Why would a link be formatted <a href="../../../../../../"> exactly like this in the source code? It contains NO filenames or anything except the slashes and dots. What does it indicate? Other links on source code look normal, but then there are some with this format thrown in. Any clues would be appreciated. The page containing the link is NOT the home page, it is 3 directories above, as explained in my second post.

PM me if necessary.

Thanks.
 
Last edited:
each ../ basically goes back a directory so the link is on the same server but 6 directories behind the current page. So it is basically what is called a relative link instead of an absolute link
 
It 's a parent directory. You can have a lot of directories like /dir1/dir2/dir3/dir4/dir5 . If you are in dir5 you may need to go/call dir1. You can use ../../../../../. You will get the index.html or index,php from dir1.
 
Thank you, very Interesting. Ok...What if this link with the 6 slashes was located on this particular page and domain, which isn't 6 directories deep:

htp://www.thebestwebsite.com/direct1/direct2/direct3/ (Totally made up this url)

Since there are only 3 subdirectories on this page (I think?), how could the relative link contain 6 slashes?

Does this mean the page link would be going forward 6 directories from the htp://www.thebestwebsite.com/direct1/direct2/direct3/...maybe landing at directory 9?

Thanks for your help.
 
Last edited:
Yeah, or my negative root???????

Something is off...I think maybe this is how the page calls in a script or something.
 
That's fine for one or two pages, but if you scale that up it might get kind of messy.
 
probably the domain is a virutual host whose document root is a few levels deep

so lets say the webroot is /www/

and www.site1.com's document root is at

/www/nichesites/niche1/site1/

so the page you are looking at is www.site.com/dir1/dir2/dir3/file.html

which is actually

/www/nichesites/niche1/site1/dir1/dir2/dir3/file.html

so in this case ../../../../../ would be referencing /www/nichesites/

or something like that

not the cleanest way to go about doing things but it is the explination that would make most since to me
 
Yeah, this makes sense; it's some kind of directory traversal trick.

probably the domain is a virutual host whose document root is a few levels deep

so lets say the webroot is /www/

and www.site1.com's document root is at

/www/nichesites/niche1/site1/

so the page you are looking at is www.site.com/dir1/dir2/dir3/file.html

which is actually

/www/nichesites/niche1/site1/dir1/dir2/dir3/file.html

so in this case ../../../../../ would be referencing /www/nichesites/

or something like that

not the cleanest way to go about doing things but it is the explination that would make most since to me
 
Back
Top