Gossamer Forum
Home : General : Perl Programming :

SSI Question

Quote Reply
SSI Question
I'm using SSI for the first time on my site and I have a question.

I have:

<!--#include virtual="sidemenu.shtml"-->

on all my pages for the sidemenu bar that is the same on all pages.

In sidemenu.shtml it has all sorts of links like "australia/index.shtml" but say if you're in the newzealand/index.shtml" directory it doesn't find australia/index.shtml as it would be "../australia/index.shtml". What do I do?

With SSI are you supposed to use absolute pathnames instead of relative pathnames?

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------

Last edited by:

Philip_Clark: Sep 24, 2001, 3:49 PM
Quote Reply
Re: [Philip_Clark] SSI Question In reply to
If the newzealand/australia directories are off your root add a / to the beginning of the path like "/australia/index.shtml"
Quote Reply
Re: [RedRum] SSI Question In reply to
Thanks for the quick response Smile

It didn't solve my problem though by adding "/australia/index.shtml" into sidemenu.shtml. Once I load index.shtml off my main directory it points to a directory beneath my main directory. Any further ideas?



---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] SSI Question In reply to
Sorry Im confused.

Could you paste the path you want and the path that is currently being inserted?
Quote Reply
Re: [RedRum] SSI Question In reply to
Yeah sure.

Just to explain what I'm doing further. I'm wanting to use SSI for my sidemenu bar as I don't want to have to change all 50 or so documents when I have a change to make to it. The directory stucture is like this:

design
- australia(dir)
- images(dir)
- newzealand(dir)
- index.shtml
- sidemenu.shtml

In sidemenu.shtml I have all my links for the sidemenu bar, i.e. australia/index.shtml, etc.

The problem is that when I'm viewing australia/index.shtml for example the link in sidemenu.shtml doesn't work for any other pages as they are newzealand/index.shtml and not ../newzealand/index.shtml. I can't change it to that in sidemenu.shtml though as if you're viewing index.shtml the link should be newzealand/index.shtml.

Do you understand what my problem is now? Thanks for your help Smile

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] SSI Question In reply to
Yeah I think so :)

My original suggestion would work - I just didn't know the directory structure.

Try using:

/design/australia/index.html

ie... put /design/ infront of the country

Im assuming design is the directory in which all the others files/dirs are?

Last edited by:

RedRum: Sep 24, 2001, 4:16 PM
Quote Reply
Re: [RedRum] SSI Question In reply to
It still isn't working Frown

I'll send you a private message with a link to the site... Hope you don't mind...

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Post deleted by Philip_Clark In reply to

Last edited by:

Philip_Clark: Sep 24, 2001, 4:58 PM
Quote Reply
Re: [Philip_Clark] SSI Question In reply to
Any ideas Paul/anyone?

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------

Last edited by:

Philip_Clark: Sep 24, 2001, 5:07 PM
Quote Reply
Re: [Philip_Clark] SSI Question In reply to
Looks as though I'm going to have to use full path names (absolute).

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------
Quote Reply
Re: [Philip_Clark] SSI Question In reply to
Yep, that's what you should do. All your links should be relative from your root directory.

That way they are guaranteed to work at any level in your directory structure.

So if your site is http://www.website.com/homepage/cool/index.htm, all the links should point to /homepage/cool/whatever...

My gosh that's a horrible example... UnsureWink

- Mark

Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: [AstroBoy] SSI Question In reply to
Did I not mention that twice already Smile
Quote Reply
Re: [AstroBoy] SSI Question In reply to
Ahh I figured out what I doing wrong.

My address is http://server5.hypermart.net/philipclark/site/ and I was adding /site/test/ which wasn't working but once I added /philipclark to /site/test/ it started working (/philipclark/site/test/). Blush

Thanks guys Smile

---------------
Cricket Web - http://www.cricketweb.net
Cricket Web Forum - http://forum.cricketweb.net/
---------------

Last edited by:

Philip_Clark: Oct 1, 2001, 3:40 AM