Forum Moderators: phranque

Message Too Old, No Replies

Switching From Windows to Linux SSI Issues

server side include problems

         

NormK

7:50 pm on Aug 22, 2006 (gmt 0)

10+ Year Member



I recently transfer couple sites from Windows (ASP) hosting to Linux. All the pages are just html, but I have a SSI(Server Side Include) on all of them. The code I using is:

<!--#include file="myfile.html"--> or
<!--#include file="../../myfile.html"-->

was working perfect on Windows hosting, But on Linux I have a problem with <!--#include file="../../myfile.html"--> it does not include file from different level (but it incdudes file on same leval).

I’m not sure:
1)did I specify something wrong for Linux like (../)
2)should I make some changes to .htaccess
3)should my hosting to do something on their side.

Any help would be really appreciated

coopster

8:01 pm on Aug 22, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, NormK.

If it is including the file on the same "level" or directory then it sounds as if your configuration is correct. However, you are right about the relative paths, they are a no-no. The value in the file attribute is a path relative to the directory containing the current document being parsed. It cannot contain ../, nor can it be an absolute path.

mod_include [httpd.apache.org] is what you want to review.

NormK

8:36 pm on Aug 22, 2006 (gmt 0)

10+ Year Member



Thanks a lot