Forum Moderators: phranque

Message Too Old, No Replies

#include question

similar functionality on linux/apache?

         

randallxski

5:59 pm on Feb 4, 2005 (gmt 0)

10+ Year Member




I'm trying to duplicate the functionality on linux/apache that I have on a MS/IIS server that uses:
<!-- #include file="myscript.js" -->
or
<!-- #include virtual="/scripts/myscript.js" -->

Those don't seem to work on linux/apache. Is there alternative functionality that uses slightly different syntax?

Thanks.

jdMorgan

9:04 pm on Feb 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Virtual include should work, but you have to enable the server to parse files for server-side-includes (SSI).

You can do this two ways, either by using AddHandler in Apache mod_mime to enable all files of a specific type (file extension) to be parsed for SSI, or by using XBitHack in mod_include, and setting the Owner Execute bit of the files you want the server to parse.

Example AddHandler directive:

 AddHandler server-parsed .html 

See the Apache documentation of those two modules for more info.

Jim