Welcome to WebmasterWorld Guest from 54.159.19.75

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Using SSI inside includes

Convince apache with XBitHack to process SSI from includes garned from SSI

     
7:14 pm on May 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 1, 2004
posts:190
votes: 0


In my .htaccess I have XBitHack on, and I have set chmod +x .index.html. Within index.html I have the following line of SSI: <!--#include file="./header.inc" -->. This works great.

Within header.inc I would like to also include more SSI to dynamically determine if an element should be of the active class. It looks like this: <!--#if expr="$DOCUMENT_NAME = index.html" --> class="active" <!--#endif -->. This works if the code is directly inside index.html, but not if the include is garned from SSI within index.html.

I would really appreciate your help with this.

7:55 pm on May 13, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Did you set the x bit for the header.inc file too? If you want to process SSI inside header.inc, you'll need to do this.

Note also that if your Last-Modified dates are important to you -- if you are concerned with cacheability management -- you may want to look into using XBitHack Full and setting the Group x bit as well.

Jim

8:40 pm on May 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 1, 2004
posts:190
votes: 0


Yes I had done chmod +x header.inc. I just had the hunch to rename it to header.html and repeat the chmod and now it works. I'm not sure what the cause of this problem is, as I am not directing the server to process any specific type of file, but only those with the x bit set.

I'm OK with it as .html though so problem solved!

9:33 pm on May 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 1, 2004
posts:190
votes: 0


Because I have a mix of php and python includes as well it has turned out to be important to figure out why it only accepts the .html extension. If you had some ideas on that it would be a great help.
9:46 pm on May 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 1, 2004
posts:190
votes: 0


Perhaps I can go at this a more round-about way for the php files, and change the directory index for that folder to index.html, and inside index.html use SSI to do a virtual include of the php file. I'll try it when i get back =)
10:26 pm on May 13, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 1, 2004
posts:190
votes: 0


Looks like i'm cured. PHP has a function called virtual (link [us3.php.net]) that is the corellary to apache's!