I am migrating to a new server and none of my old PHP SSI do work anymore.
Old config: Plesk 7.5.4 with PHP 4.3.8 running Apache 2.0.50 on Fedora
New Config: Plesk 7.5.4 with PHP 4.3.11 running Apache 2.0.53 on Fedora
Code: Select all
The code in question is on an HTML page:
<!--#include virtual="includes/header.php" -->
Works perfectly on old server:
http://www.exactamerica.com/exact/about.html header/footer and right section are all PHP SSI, but on the new server the page will not even display.
I have tried to replace them with SHTML on the new server and it works fine, so SSI is turned on properly. All my PHP pages of the site do work properly and all the PHP SSI on PHP pages work perfectly. Just when I have PHP SSI in .HTML files that it craps out.
I tried a bunch of .htaccess edits but none of them fully satisfied me as they either serve the HTML page with the PHP SSI but then non of the stand alone PHP pages worked anymore.
Some people suggested that I needed:
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
You need something like this in your httpd.conf file.
But my httpd.conf file is already set that way. My belief is that it can be solved with an edit on the .htaccess but cannot find the good combo of edits to make it all work as before.
I have full control over the server (1and1 is my provider of root server) and can set it up as I want but until this new server I never faced that problem.
Since the site is well indexed and ranked by search engine, converting all my pages to PHP is not an option. Changing to SHTML all the includes is not an option either as I have dynamic script in the PHP includes so need a PHP extension.
If you believe you can be of help to solve the problem please let me know.
Cheers,
- Jeremie