php to shtml .htaccess file

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

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: [ColinW-O] php to shtml .htaccess file

By Dave - September 28, 2009

It's actually unusual that they would have both been working before. Usually it's one of the other (PHP or SSIs).

I think there is a way to do that but you'd have to check with the host as to how they how Apache configured on the old server that allowed that.

Another thing to keep in mind if both are enabled is there may be a security risk if the SSIs are processed after PHP, because anyone who can add content to the site could add a SSI tag and have it executed.

Hope that helps, let us know how it turns out.
Dave Edis - Senior Developer
interactivetools.com

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