Forum Moderators: phranque

Message Too Old, No Replies

Supporting both PHP and CGI includes in .html pages

Using .htaccess directives

         

WebWalla

11:33 am on Jan 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



At the moment my webpage is using .cgi SSI include statements of the following type ...

<!--#include virtual="/includes/sitemenu.html" -->

My .htaccess file allows this as follows ...


AddHandler server-parsed .htm .html

However, my new template uses PHP includes. This isn't a problem in itself, but I want to allow both PHP includes and CGI includes until I can get all pages on the new template.

I was hoping to use an .htaccess like the following one, but it seems both directives together aren't allowed.


AddType application/x-httpd-php .html .htm
AddHandler server-parsed .html .htm

Any ideas how I can get both includes to work, or are they simply incompatible?

Thanks.

coopster

3:17 pm on Jan 5, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Here is a thread in the PHP Forum that answers the question, Do ssi's work in PHP pages? [webmasterworld.com]