OK I have abut 40 articles on a site that are ranking very well on the search engines and pulling in hundreds of unique visitors a day for my site. That said, I have recently created a new template for the site which will see the article pages changed from /articlepage.html to /articlepage.php I was just wondering what was the best way to go about changing this file extension and retaining the SERP rankings, traffic, PR etc? And how would I go about doing it? And what sort of effects upon SERPs and PR can I expect?
Use the .htaccess file, simply add this line to the bottom of the file redirect 301 /page1.html h ttp://www.sitename.com/page1.php Personally, I would place the 301 in each file, but the easiest is the .htaccess file.
If you have to change the names a 301 would be best. If you don't have to change the names but still want to be able to include php in these files use this in your htaccess AddType application/x-httpd-php .php .html Code (markup): It will parser html files as php as they would if they had a php extension.
Thanks. Also why would you add a 301 in each file - does this have added SEO benefits? What will the effects be on SERPs if I apply this method? Well I plan to create more articles in the future and they will all be made with a .php file extension to allow things like php includes etc so I think it would be in my interests to keep things consistent. Also, so what effects will I see on my SERPs and PR if I apply a 301 redirect?
If you use a 301 the SE's will eventually transfer the PR and the rank to the new page and drop the old one. I have never seen any drop in rankings or traffic when I do this.
I would allow PHP in html files, so you can use includes and all. Or use a 301 redirect via .htaccess