php to shtml .htaccess file

6 posts by 3 authors in: Forums > CMS Builder
Last Post: September 28, 2009   (RSS)

Hi

I was recently using the command

"Addhandler application/x-httpd-php .shtml .php"

in the .htaccess file for my CMS Builder website and recently my Hosts moved my site to a new server and the page wasn't being displayed and only showing the code of the website instead of the proper output.

They told me that I need to change it to the following command:

"AddHandler php5-cgi .shtml .php"

While the php data loads, the SSI doesn't. I've been sending emails back and forth for three days now and I can't seem to resolve this problem.

Any idea what else I can try?

Thanks.

Re: [ColinW-O] php to shtml .htaccess file

By Chris - September 23, 2009

Hi ColinW-O,

Is the problem that you're using SSI includes and your new server doesn't support them? You could try replacing your SSI includes with PHP includes:

<!--#include file="more.html"-->
<?php include "more.html"; ?>

That's more or less a guess though. Your host should know what the problem and solution are.
All the best,
Chris

Re: [chris] php to shtml .htaccess file

Well SSI works if I empty the .htaccess file; they're just not working together that's the odd thing.

Using PHP include works but that means I have to edit all files manually now :)

Re: [Dave] php to shtml .htaccess file

I used the <?php include "more.html"; ?> code rather than the usual SSI include tag. I edited each file manually.

Oh well. It didn't take as much as I thought!

Re: [ColinW-O] php to shtml .htaccess file

By Dave - September 28, 2009

Ok, good to hear. Thanks for posting back to let us know it's all working now. :)
Dave Edis - Senior Developer
interactivetools.com