Forum Moderators: phranque

Message Too Old, No Replies

Redirect Q. : .htm to .php

or "I should know this"

         

mcjohnson

2:46 pm on Jun 28, 2007 (gmt 0)

10+ Year Member



I am converting a site from .htm to .php on all pages.

What's the best way to deal with this from a redirect standpoint? meta-fresh on each old page? I doubt this is prudent.

Would a 303 Redirect be sufficient to redirect any one who tries to use an old bookmarked page to the correct page, i.e. the new home page?

And will Google/Yahoo follow the 303, assuming it's all pproperly placed in the .htaccess file?

Thanks as usual

MatthewHSE

4:50 pm on Jun 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just an idea, but if you add the following line to your .htaccess file, you shouldn't need to do any redirects at all:

AddHandler application/x-httpd-php .php .htm

This tells the server to parse .htm pages for PHP, meaning you can use PHP in your existing pages without changing the file extension at all.