Web Hosting Talk







View Full Version : SSI include


ben
03-11-2002, 02:39 AM
Hi,
in my current hosting, I can't use SSI Include command like this:
<!--#include virtual="/inc/header.txt" -->

I think it's very weird. :rolleyes:
Because in some another hosting, the include method like that worked!

Anyone know why it's not work?:rolleyes: :rolleyes:

panopticon
03-11-2002, 04:43 AM
To eliminate the obvious, do they say they support SSI at all?

ben
03-11-2002, 04:49 AM
Yes, but only SSI code like this will work on their server:
<!--#include virtual="./inc/header.txt" --> and <!--#include virtual="../inc/header.txt" -->
(with . before slash)

I have many files using <!--#include virtual="/inc/header.txt" --> :(

Any idea to solve this problem?:rolleyes:

iVersit
03-11-2002, 09:43 AM
It's definitely all in the environment, when you declare a / before a folder, most systems look to the root directory of the machine and build from there.


I'm willing to bet that this would work on your current system:

<!--#include virtual="inc/header.txt" -->

I'm not sure there is an 'easy' way to fix this...

ben
03-11-2002, 11:15 PM
Originally posted by Orpheus1539

I'm willing to bet that this would work on your current system:

<!--#include virtual="inc/header.txt" -->

Yes, this one is work also, but as I told you before... I have many files with SSI code like this: <!--#include virtual="/inc/header.txt" -->
:(
Could anybody explain why they're different?
:rolleyes:

Originally posted by Orpheus1539

I'm not sure there is an 'easy' way to fix this...
:bawling: :bawling: :bawling:

NyteOwl
03-12-2002, 08:26 PM
The difference has to do with the way they have the document root configured in the server. For them

./ means the current user directory (where your files are)

/ means the servers root directory (which you don't have access to)

It looks like you will have to edit your files to change "/" to "./".

ben
03-14-2002, 11:24 AM
I think almost web hosting allowed using "/" path for SSI and PHP. CMIIW..
So, could you explain which one's better? Using "/" or "./"?:rolleyes:

How to tell my hosting to enable "/"?
They still with "./" :bawling:

I've no idea why they want to use "./" instead of "/"... :mad: