Search code examples
apache2includeserver-side-includesssi

Apache: SSI inside SSI


Is there a way I can include include files inside include files? (Say that five times fast!)

For example:

Inside index.html:

<!--#include virtual="/include-1.shtml"-->

Inside include1.shtml:

<!--#include virtual="/include-2.shtml"-->

So the tree looks like this: index.html <-- include_1.shtml <-- include_2.shtml

As is, this is not working on my Apache. The first include works fine, but the content for the nested include doesn't display.

As it is relevant, I am using the XBitHack on Apache 2, and I've double checked that both files are executable by the web user.

Help?


Solution

  • Make sure that Apache is actually trying to process the *.shtml files. Try putting

    <!--#echo var="DATE_LOCAL" -->
    

    in a *.shtml file and seeing if you get the expected results. Do you get the same result in a *.html file? If you don't see the dates in both, your configuration is off.