Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Following this question

I was able to create my index using a PHP file included in a SHTML file as follows

<!--#include virtual="/header.php" -->

This is written in the "header.shtml" which is declared as HeaderName in the .htaccess-file.

Now, this works perfectly fine on my local host (a MAMP-PRO), but when I upload it to my webspace, it won't work - The file is not included. When I check the source code, the directive written above to include the PHP is just written in plain text, so it seems it's not executed by the server.

Is there a flag I need to set to make this work? Or any workaround?!

share|improve this question
up vote 1 down vote accepted

The hoster must load mod_include. Also, someone (the hoster or you) has to configure it:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Also, either in .htaccess or in the < Directory > block matching your directory:

Options +Includes
share|improve this answer
I had those already in my .htaccess – Florian Peschka Oct 12 '10 at 20:07
Does shtml work for including HTML files, without PHP in the game? – AEP Oct 14 '10 at 16:27

SSI probably needs to be enabled.

share|improve this answer
I asked my provider and he assures me that it is enabled. – Florian Peschka Oct 12 '10 at 20:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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