Help - Search - Members - Calendar
Full Version: IIS/PHP and a different file extension than .php (.html instead)
The Planet Forums > Operating Systems > Microsoft Windows
leesiulung
Ok, so I have a fully working PHP installation running on Windows 2003 Server with IIS 6. This is not my choice, as it seems more common with more support for running PHP with Linux and Apache.

Anyhow, the issue is that I need 301 Redirects for specific files with the extensions in .html. However, with HTML files you can't set headers, thus I'm forced to process all .html files as php files so headers can be set using PHP.

Problem is, I tried adding the .html file extension to the "mapping" in IIS to the isapi file and it does not work. This is where I set the .php file extension for PHP processing in the past and expected a similar behavior. I made sure to select "All verbs" and checked "script engines" and "verify that file exists".

Any suggestions?
CornFused
It should be as easy as what you are doing. Have you tried to restart IIS?

Make sure you have the same properties for the .php mapping as you have for the .html mapping. I haven't done it, but I see no reason why it would not work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.