[thelist] Efficient Redirect: html to php

Scott Schrantz scotts at rci-nv.com
Mon Mar 29 18:00:34 CST 2004


> -----Original Message-----
> From: live4bacon at optonline.net [mailto:live4bacon at optonline.net]

> I am looking to take an established website (ie indexed by 
> the major search engines w/ great to decent rankings) which 
> is made up entirely of .html pages and convert it to .php pages.
> 
> And I am not so sure that htaccess redirects are the most 
> efficient way to get this done.  
> 
> Can you all enlighten me on the most efficient way to 
> accomplish this move! Which would not affect my search engine 
> results and be transparent to the visitor coming from old 
> links/bookmarks.

You're looking at it backwards. Don't change the file extensions, change Apache so it looks in .html files for PHP code.

Add this to .htaccess:
AddType application/x-httpd-php .htm .html

That way, the file extentions don't have to change, so bookmarks and search engines won't be affected a bit.

--
Scott Schrantz
work: www.rci-nv.com
play: www.computer-vet.com/weblog/


More information about the thelist mailing list