I know this is pretty simple but I can't find the answer for it..

say you have an link that you want to connect to..

http://example.com/example1/example2/final.com

and you don't want it hard coded cause you have many other links that will use that path.. say..


http://example.com/example1/example2/final1.com

http://example.com/example1/example2/final2.com

how can i get up to the third directory? if just use "/final1.com" it turns out as
"http://example.com/final1.com", it cuts out the other paths..

thanks in advance..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.