Wednesday 21 September 2011

How do you make just ONE .html page run as .php using HTACCESS?

If I put: %26quot;AddHandler application/x-httpd-php5 .html .htm%26quot; (without the quotes) into my .htaccess file, it makes all html/htm files run as php, without me needing to manually change the file extensions (from .html to .php).



However, I only use PHP on the index page, and am concerned that this will slow everything down (because it makes ALL pages run as .php instead of just the index page).



I tried %26lt;Files index.html%26gt;AddHandler application/x-httpd-php5 .html .htm%26lt;/Files%26gt; but it just produces an internal error.



Does anybody know how to do it?How do you make just ONE .html page run as .php using HTACCESS?Use a server-side include to include the output of a PHP script into the HTML page.