Web Hosting Forum | Lunarpages


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



Login with username, password and session length
May 25, 2012, 07:34:06 AM

Pages: [1]   Go Down
  Print  
Author Topic: How to use SSI to include the header file and footer file  (Read 346 times)
damen
Newbie
*
Offline Offline

Posts: 4


WWW
« on: February 10, 2003, 03:22:00 PM »

I am quite new to Lunarpages. I do not know if it supports using SSI to include the header file and footer file. If so, is the syntax something like :

<!--Include Virtual="path/filename.html" -->

I tried this one but does not work. The system promps me error that it does not support ASP. I guess I have used the wrong syntax. Can anyone advise ???

Thanks
Logged
stephan
Guest
« Reply #1 on: February 10, 2003, 03:51:00 PM »

Hi, it must think you are trying to use ASP.

ASP can be added to your account if you want, but that's another story!

Is the page called something.shtml ?

For SSI, you have to call the page .shtml.

You may also have to make it executable, but I'm not sure.
Logged
damen
Newbie
*
Offline Offline

Posts: 4


WWW
« Reply #2 on: February 10, 2003, 03:58:00 PM »

Definitely I am not using ASP.

Yes, I have used the filename extension shtml already. So anything wrong ? But I guess there is no need to make it executable.

I tried similar things in other web hosting service company and it works. But I know that every web hosting company handle the SSI differently (in term of restrictions and syntax) and I am not sure how Lunarpage handle this. That's the reason I came to ask here in the forum.

So any one can help?
Logged
s102r18
Spacescooter Operator
*****
Offline Offline

Posts: 38


WWW
« Reply #3 on: February 10, 2003, 11:03:00 PM »

quote:
<!--Include Virtual="path/filename.html" -->

If you've posted the code correctly, you are missing the "#".  This code works for me numerous places in my sites:

<!--#include virtual="path/file.html" -->

If that doesn't fix your problem, post a link to your .shtml file so we can investigate further.
Logged
esm
Trekkie
**
Offline Offline

Posts: 17


WWW
« Reply #4 on: February 14, 2003, 05:32:00 AM »

the missing # might be the problem

 
code:
 <!--#include virtual="/html/rightcol.html" --> 

although lunar pages handles it differently, back in the old days we had to use .htaccess for ssi calls to files with just the html extension.

 
code:
 AddType text/x-server-parsed-html .html 

Logged

Gene
The older I get, the more I admire competence, just simple competence, in anything from adultery to zoology
Brian
Jedi
*****
Offline Offline

Posts: 874


WWW
« Reply #5 on: February 15, 2003, 01:10:00 AM »

the way i did it is as follows:

i put this line of code where i wanted my ssi to be:
<!--#include file="filename" -->

you also have to name the page .shtml for the server to recognize that it has a job to do. you don't have to do any fancy coding or such, just use whats up above, and rename the page to .shtml instead of .htm or .html

-Brian
Logged

Stephanie®
Master Jedi
*****
Offline Offline

Posts: 1096



« Reply #6 on: March 26, 2003, 03:48:00 PM »

Another useful one for shtml is to use:

<!--#exec cgi="cgi-bin/yourfile.cgi" -->

This will execute and run a cgi script for you.

If you're deep into a folder and you want to go back in the root or somewhere else, it usually necessary to include the full path to your script also.

IE:
<!--#include file=" /home/yoursite/public_html/
yourfolder/yourfile"-->
Logged

TWebMan
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3112



WWW
« Reply #7 on: March 26, 2003, 05:06:00 PM »

Make sure you don't use the virtual file system...relative is okay, but don't use the virtual root.

<!--#exec cgi="cgi-bin/yourfile.cgi" --> is ok

<!--#exec cgi="/cgi-bin/yourfile.cgi" --> won't work
Logged

"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila."  - Unknown
"Liberty of any kind is seldom lost all at once." - D. Hume
Every day is an Ode to Joy
The planet will be fine... and so will your site
Pages: [1]   Go Up
  Print  
 
Jump to: