Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 09, 2012, 07:49:20 PM

Pages: [1]   Go Down
  Print  
Author Topic: please help -- what path to use in SSI file reference??  (Read 295 times)
dogpound
Intergalactic Cowboy
*****
Offline Offline

Posts: 71


WWW
« on: November 26, 2002, 09:11:00 AM »

I am trying to use SSI to plug navigation code into every page of my website.  I can't seem to find the right path representation!

The file containing the code is called navigate.html.  The include works only if I place a copy of navigate.html in the same directory as every calling file, and call it with this code:

<!--#include file="navigate.html"-->

I would rather place navigate.html in my public_html directory and access it from files in various subdirectories.  However, when I try that, I get an error.

I have tried the following paths, but none work:

/navigate.html

../navigate.html   (called from one level down)

/home/myaccount/public_html/navigate.html

I even tried using the URL.  Nothing.

Anybody have an answer for me? Or any ideas?
Thanks for your help!
 
 [ November 26, 2002, 05:13 PM: Message edited by: DogPound ]
Logged
Max
Über Jedi
*****
Offline Offline

Posts: 2534



WWW
« Reply #1 on: November 27, 2002, 01:04:00 AM »

What server are you on?

There should be a few posts about ssi if you search the forum.
Logged
dogpound
Intergalactic Cowboy
*****
Offline Offline

Posts: 71


WWW
« Reply #2 on: December 03, 2002, 10:51:00 PM »

Hi Max,

I had searched the boards for "ssi paths" but didn't find a good solution -- I don't want to switch to PHP, and the paths that were offered in previous posts didn't work for me.  (I'm on Saturn, by the way.)

Nonetheless, I was able to resolve the problem by replacing
 
#include file=...

with

#include virtual= ...

It seems to work fine.  Unfortunately, I do not know if there are any effective or functional differences between the "virtual" and "file" parameters.  If you or anybody here knows how to determine which parameter should be used and why, please tell me.

Thank you!
 "[puter]"
Logged
JamesYap
Intergalactic Superstar
*****
Offline Offline

Posts: 167



WWW
« Reply #3 on: December 04, 2002, 07:54:00 PM »

Hi, here is a suggestion (not a solution).

Since SSI are not popular nowadays and I do have bad experience with SSI, I suggest using .php (instead of .shtml).

Just name your .shtml files to .php and include files you want with the syntax

(? require('navigate.html') ?)

or

(? require('../navigate.html') ?)

** They do not allow me to post TAG, MUST change the ( and ) to < and > !!!

Actually I have seen people posting issues on the file path problem. They also unable to include file when it is not located in the same directory. But I don't have problem with this. I am on Mercury Server.
Logged

Why LunarPages is the best web hosting? Read our LunarPages Review to find out now.
Pages: [1]   Go Up
  Print  
 
Jump to: