Hello, I'm willing to pay $10 via Paypal to who ever can make a modrewrite for me. I currently have .html pages. For ease of editing I'm going to create php pages, but I need search engines to see these php pages as html pages. My URLs need to go from: site.com/aboutus.php to site.com/aboutus.html Thanks!
What BlondJon is trying to do is a very simple server side trick that allows web site owners to change their pages from static to dynamic (html to php) without the # of indexed pages or SERP results changing one bit. There are 2 important points to why he is doing this. 1. by making your site php (or similar) you open the door to easy editing. If you had a site built a while ago, there is a good chance that the pages were created in html therefore offer no dynamic features to it at all. Bottom line is that editing any part of your site becomes a pain in the ass because you have to change 50 pages instead of just one line of code. 2. Over time, search engines will have all your pages indexed. If you all of a sudden change your entire site to .php extensions you basically get to start from scratch (pages won't be indexed, inbound links are all broken, etc.). Basically aboutUs.html & aboutUs.php are totally different pages in a bots eyes, even though they would have the same content. He also avoids any duplicate content penalties (though it would be small since on the same site). Sorry for the lengthy explanation for the benefit of the readers, but Jon has obviously put a lot of though into the upkeep of his site and I want to make sure that the reasons behind this move are clear. Jon has effectively changed his entire page structure and enhanced his ability to regularly update his site. All the while having 0 clues of this left behind to confuse slurp, googlebot and the rest of the gang. Well done Jon & best of luck.
This is what you want to do, make the php pages using GET values for each page then do mod rewrite from the html to the php page with get value inserted. RewriteRule ^index.html$ /index.php?menu=index [R=301] RewriteRule ^index.html/?$ /index.php?menu=index There might be a cleverer way to do this.. RewriteRule ^([^/]+).html$ /index.php?menu=$1 [R=301] RewriteRule ^([^/]+).html/?$ /index.php?menu=$1 So it would rewrite anything that is a html page to index.php?menu=htmlpagename (without the .html extension)
EDIT: sorry, I keep tabs open for far too long before replying and missed that message Jon, first, create a file named ".htaccess" in the web root, e.g. /public_html/ Method 1: Rewrite .html to .php Add this to .htaccess: RedirectEngine On RewriteCond %{REQUEST_URI} (.+)\.php RewriteRule . %1.html [R=301,L] RewriteRule (.+)\.html $1.php [L] Method 2: parse .html as .php Go to your file manager, rename all files from *.php to *.html Add this to .htaccess: RemoveHandler .html .htm AddType application/x-httpd.php .html .htm