homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

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)

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)

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.



 8:40 pm on May 13, 2005 (gmt 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)

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)

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)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved