How to map "no-extension" URLs to preserve linkjuice

kyaizen

揸緊中指
May 26, 2007
606
1
0
OK, so I managed to snag an expired PR4 domain with lots of inner pages with backlinks -

website.com/page1
website.com/page2
website.com/page3


I've scraped the pages using HTTrack so I have lots of .htm pages -

page1.htm
page2.htm
page3.htm

How do tweak the htaccess file to map website.com/page1 to website.com/page1.htm and so on?

Thanks guys!
 


mod_rewrite. Create a .htaccess file in your document root, and put something like this in it:

Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ $1.htm [L,QSA]

Untested.