Concentrate Your Pagerank With Htaccess Redirect
People (or you) can link to you to your homepage using four different urls:
http://www.domain.com
http://domain.com
http://www.domain.com/index.html
http://domain.com/index.html
So you are dividing your one page’s pagerank amongst those urls. What you want is for those urls to all be 301 (permanent) redirected to one page, optimally one without the index.html (since later on you may choose to use index.php or other). This can be accomplished with a few simple .htaccess redirects.
First thing you want to do is choose whether you want www.domain.com or domain.com
domain.com >> www.domain.com
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
www.domain.com >> domain.com
RewriteBase /
RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
Replace domain.com with your domain.
Source: enarion.net
Then you want to redirect your index.html/htm/php/any other extension to the folder
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.domain.com/$1 [R=301,L]
Replace index.php with your index.extension and www.domain.com with your domain
Source: Search Masters
Put it into your root folder and viola! You’ve just concentrated 4 pages of pagerank into one!
Filed under: Code Snippets | 1 Comment »

