Hi I am plannig to rebuild my website (PR 5). At present it's main section has about 100 pages (all static html ). They all are indexed by Google, have pagerank of 3-4 and send 250-300 visitors everyday. I want to redesign all these pages by using include php command (so as to have seperate header, footer & sidebar files which will be included in all these pages and eventually help me in updating the site quickly). Since rebuilding the pages in such a manner will change their extension from .htm to .php, I am apprehensive about their standings in Google search results. As the old pages with .htm extension will be replaced by .php pages, I am afraid I will lost my entire trafic that I presently get from Google. On the other hand I also feel that this site really needs a modification like this. So here I want your advice on following points : (1) As the content will remain the same and only the extension of pages will change from .htm to .php, will it seriously affcted the flow of visitors from serch engine ? (2) Have you done any similar overhauling of your website in past ? If yes what was your experience. (3) Is there any alternative possible which allow me to separate the content from designing without changing the .htm extension of these static pages ? Any suggestion is welcome. Thanks.
You can use .htaccess to make the server parse the php which is included in the html pages. Such as: RemoveHandler .html .htm AddType application/x-httpd-php .html .htm Or possibly you can use mod_rewrite so that when the htm page is called it is instead pointed to the php file.
I use what chopsticks said and it works very well. Just have it include .inc files, and have each page have a variable on the top (like $pageid), so you can title/work with them them accordingly. For instance, you could have the header.inc file say: <title>Website Name || <?php echo $pageid;?></title>
Have a look at http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm - This should help you to redirect your viewers to the correct page from the old cached pages in the search engines database to the new .php page you have made. I did 301 redirect only the other month and have had no problems sofar.
Thank a lot to all of you for replying. The article suggested by 'Blame Me' is a very interesting read and quite easy to follow. However, I could not understand clearly the suggestions given by Chopsticks & Ninjanoodles. Can you please explain the procedure of "using the .htaccess to make the server parse the php which is included in the html pages" in some more detail preferrably by giving a small example. (Actually I am not from the programming world, have used only Frontpage & Wordpress so far). Or should I use the Redirect 301 method as suggested by 'Blame Me' ? Regards
Well, my suggestion was basically for this. Instead of having to rename all the .htm pages to .php you can just make the server parse the php in the htm files. This way your pages will still have the .htm extensions and you will be able to have your separate header, footer and sidebars included in them using the php include function or the like.
The advice given by chopstick is very much feasible and considerable so just try that and redesigning will surely effect the traffic on your site.but it's not always negative it may work very positively by increasing the traffic.
ya..it will about 3-4 month to reset your pages , during this period your traffic would drop but as your site but will increase as you are switching to dynamic contents.
301 redirect will pass on the PR to new "php" extension pages, while using .htaccess to retain the html extension will load the php page here on the html page. (Both uses .htaccess) The second method will return a 200 OK status for the html page The first method will return a 200 status for PHP page, and a 301 for html page. A 301 redirect will take time to pass on the PR, while loading page here is like nothing changed. Decide which one would be better... Then just do a web search for .htaccess codes. Sorry I don't have a link handy right now. BTW, Some may argue that the second technique is black hat, although is very popular. Bye
You are very wise to ask before doing this! Keep the html and do not change the extensions! It is not necessary. The .htaccess will take care of your problem and the bots will never know the difference. There is nothing wrong with this, you’re just telling the server to honor php requests inside .html files. Here is the command for the .htaccess file. Try this before you go and create yourself a major headache! AddType application/x-httpd-php .php .html