1

I use MAMP to develop sites. I have each site in it's own folder in the htdocs folder. I manage one site that I need to use ssi directives on, because the host doesn't allow php includes.

I've un-commented these lines in httpd.conf file:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

I added a .htaccess file in the htdocs folder with the following:

AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

On the site index page the include works using:

<!--#include file="top-nav.shtml" -->

But it does not work on files in any sub folder. I get this error:

[an error occurred while processing this directive] 

2 Answers 2

2

I find the most common reason that SSI still fails following these set up procedures is that that the port (default 8888) is not specified when calling the local web page in the browser.

See: http://documentation.mamp.info/en/mamp/first-steps

1
1

It turns out that that using virtual rather than file works on sub directories. I'm still not sure if there is any particular reason file doesn't work. The question was answered on serverfault.com.

The thread is available here: https://serverfault.com/questions/214096/how-to-enable-ssi-for-all-html-files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.