homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

html to php

 9:56 am on Oct 17, 2005 (gmt 0)

site's whole content is html and planning to change it to php. what is the best redirection method without losing any traffic and following google's guidelines?

aside from 301 redirection, are there any other ways? should I delete the html files?



 5:23 pm on Oct 17, 2005 (gmt 0)

There are several ways to do it. If your server supports it, you can execute php code in a html file with a command like the following in the .htaccess file

RemoveHandler .html .htm
AddType application/x-httpd-php .php .html

Another way would be a rewriterule to change the php files to htm files.

RewriteRule (.*)\.htm$ $1\.php

check the syntax as it may not work on all servers.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved