Forum Moderators: open

Message Too Old, No Replies

301 redirects .htm to .php on iis6.0

         

surrealillusions

3:20 pm on Jul 26, 2010 (gmt 0)

10+ Year Member



Hi all,

How do you do redirects on iis 6.0?

Basically I've redesigned and re-coded a website for a client which is hosted on an iis6.0 server. I write in PHP and that works fine. Only problem is the old pages are .htm and the new files (mostly different names) are .php

Is there an easy way to redirect the .htm files to the relevant .php files using a 301 redirect? Such as a iis version of .htaccess file where I can simply write a line to redirect the relevant pages.

Thanks

:)

Ocean10000

12:33 am on Jul 27, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I know of no truely easy way to do it with IIS 6. A old trick is to map the 404 redirect page to a php or asp page, which you can then examin the original url request and do a proper redirect from there.

surrealillusions

9:06 am on Jul 27, 2010 (gmt 0)

10+ Year Member



Ah ok.

I've basically made each old page into a meta redirect page, with a brief note saying 'page doesnt exit, you'll be forwarded..blah blah blah etc etc..'

And then redirects to the home page.

Its not pretty, but it works, and with there only been a small number of pages (about 10-15), it was quick to do.

:)