Forum Moderators: phranque

Message Too Old, No Replies

"#include virtual" not working

option include

         

jscjso

7:45 pm on Jun 26, 2008 (gmt 0)

10+ Year Member



I have these in my Apache2.2.9 conf/httpd.txt:

LoadModule include_module modules/mod_include.so
..
<Directory "C:/Apache Software Foundation/Apache2.2/htdocs">
..
..
Options FollowSymLinks ExecCGI Includes
..
</Directory>

I have this in my index.html:
<!--#include virtual="example.pl" -->

However, when the index.html is executed, I cannot get the example.pl being executed.

Anything I missed?

jdMorgan

10:31 pm on Jun 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You will need the full server filepath to the include file -- Everything from the DocumentRoot down to the file.

You will also need to either rename the file to use a .shtm or .shtml extension, or add the directive

 AddHandler server-parsed .html 

to your <Directory> container or use XBitHack (see Apache mod_dir) in order to enable your .html file to be parsed for SSI code.

XBitHack is to be preferred if only a few of your .html files need to be parsed for SSI.

Jim