leesiulung Posted May 15, 2007 Share Posted May 15, 2007 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? Quote Link to comment Share on other sites More sharing options...
Guest prozente Posted May 17, 2007 Share Posted May 17, 2007 Adding .html to be processed would add a decent amount of overhead if you have a lot of static files. What I would probably do instead is add index.php to the list of index files. Then say you have a file foobar.html that you need a 301 for, create a directory with the name foobar.html then inside the directory put an index.php file with your 301 header code. Quote Link to comment Share on other sites More sharing options...
leesiulung Posted May 22, 2007 Author Share Posted May 22, 2007 I apologize for not seeing your post earlier, for some odd reason my browser kept displaying a cached page (even with the setting, check for changes eery time I access a page). The problem is that the url have to have the .html extension. I realize that it adds quite a bit of overhead, but most of our pages are .php or .htm. I purposely picked .html for this as there were only two options. However, your suggestion sounds like a trick that would work. I will give it a whirl. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.