PDA

View Full Version : Link problems in sub folders??


tux
04-17-2009, 09:20 AM
Hi all,

I have introduced a new part to a website using a sub folder including its own index page.

I had problems with the links on the new page not working including the images. I have had to code the full paths to get them to work.

For example.....

src=Images/logo.gif

needed changing to....


src=http://www.mysite.com/Images/logo.gif


This is so annoying. What do I need to do for my old links to work in sub folders.

Thanks, Paul

davidj
04-17-2009, 09:35 AM
actually your absolute paths are fine

its how you should do it

best practice and all that

tux
04-17-2009, 10:24 AM
So are you saying that you should always use absolute paths on everything, including images etc. and not relative paths??

What makes it best practice out of interest??

tux
04-17-2009, 10:28 AM
.... and why do my relative paths not work in my sub folders??

edbr
04-17-2009, 10:43 AM
src=Images/logo.gif
is in the same foder src=../Images/logo.gif is the folder above

tux
04-17-2009, 10:52 AM
Thanks Edbr.