Knowledgebase: PHP
How can I have the server parse html files as if they were php?
Posted by Arvand Sabetian (Import) on 04 March 2009 01:35 PM
|
|
This only applies to linux hosting accounts: Inside the directory with the html files, create a .htaccess file and inside, place the following - AddHandler application/x-httpd-php5 .html For windows hosting accounts: Inside your web.config file, placed the following between the <handlers> tags: <add name="html via php cgi" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:\Php5\php-cgi.exe" resourceType="Unspecified" /> | |
|
Comments (4)
Fred Stetson
22 January 2011 09:27 AM
I am on ASP Personal class and using DNN. I am trying to use existing PHP scripts from Poker Mavens remotely, to show several things, such as; Chip Leader Board, New User Account, and (poker) Server Status. I added the above handler to my web.config file and still nothing. Can anyone help? AM I on the wrong type of server to run DNN?
Arvand Sabetian
31 January 2011 01:32 AM
If you are remotely accessing php files, you do not need any handlers as the php scripts would run on the remote server.
Joe Herzig
20 July 2011 07:31 PM
Any idea how to do this for asp? That is have static .html files run asp by modifying web.config file?
Arvand Sabetian
25 July 2011 09:05 AM
I would use http://blog.arvixe.com/how-to-use-internet-information-services-iis-7-manager-to-connect-remotely-to-your-website/ to view your site remotely and under the extensions section, mimic how .asp is setup and alter .html to do the same.