SSI in apache

mw84

Registered
Can somebody let me know where I'm going wrong here. I'm trying to enable ssi in apache to include text from one page into another. I've added this:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Options +Includes

to the .htaccess file because that's what I understood the apache help doc to say. I've renamed the page I'm trying to include this text on with a .shtml extension and still nothing shows?

This is an example of the code im using to call the text up <!--#include virtual="http://www.whatever.com/whatever.html"-->

Any ideas what I'm doing wrong?
 
One problem: Your virtual include reference should start with a /, not with http://

From apache.org:
The virtual attribute is probably more useful, and should specify a URL relative to the document being served. It can start with a /, but must be on the same server as the file being served.
<!--#include virtual="/footer.html" -->

And another possible problem: In order for the directive in your .htaccess file to do its job, you must have Allow Overrides turned on in your httpd.conf file. I don't recall offhand whether it's on or off by default.
 
Back
Top