wampthing Posted January 29, 2005 Posted January 29, 2005 I am designing a site using server-side includes. I am having a problem with the links in the navigation bar (include). my site files look like +newsletters -2003_newsletters -2004_newsletters -2005_newsletters +Photos -2004_photos --jan_2004_photos --feb_2004_photos --mar_2004_photos --apr_2004_photos --jan_2004_photos -2005_photos --jan_2005_photos +Includes -top_navigation -side_navigation +assets -logo.jpg -buttons.jpg I have each HTML page in the corresponding folder with the supporting assets. My problem is when I use a SSI from the includes folder the link to the logo.jpg does not work since it is relative. in other words it will work for the index.shtml file but when I have a photos.HTML in the photos folder the path to the logo in the include doesn't work. How should I fix this? Should I just use an absolute URL, or should I reorganize the site somehow? Quote
TCH-Bruce Posted January 29, 2005 Posted January 29, 2005 If you use an absolute URL in the include files when the include is parsed into the subfolder HTML files the path would be set. Is this what you are asking? Or have I completely missed it? Quote
LisaJill Posted January 29, 2005 Posted January 29, 2005 Just use /images/nameofimage.jpg instead of images/nameofimage.jpg. You don't need a URL in it, just use the beginning slash to tell it to look from web root. =) Quote
wampthing Posted January 29, 2005 Author Posted January 29, 2005 You learn something everyday. I always wonderd what that extra / at the begining did. Your a peach! THanks to both of you for your help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.