Welcome! Log In Create A New Profile

Advanced

How to parse HTML files as PHP

Posted by nhebb 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
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!

Online Users

Guests: 76
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready