Welcome! Log In Create A New Profile

Advanced

How to parse HTML files as PHP

Posted by nhebb 
How to parse HTML files as PHP
May 17, 2010 08:45PM
I have some .htm files I want to parse as PHP, but I can't find any resources for this. I tried adding the following to my configuration file, but got some strange results (described below):

[code]
# process html files as php
location ~* .(htm|html)$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /usr/local/nginx/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /home/public_html/my_real_domain.com/public/$fastcgi_script_name;
}
[/code]

For new files containing php, it parsed them just fine. So I know this works.

But for existing files in which I modified any of the php or html markup, the server would dish up the old version of the file. I ran some tests, checking the source on the server and the files had been updated. I changed some html elements and did a view source on the client and confirmed the old files were being served. I also checked from a clean machine to ensure it wasn't a browser caching issue.

Any ideas how to solve this?

Thanks!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready