Here's a traffic tip from CyberTrafficHits.com. Hope it helps.
Funneling PageRank from root domain to www. using Mod_ReWrite
The Problem
When building PageRank you may encounter someone who links to your domain as domain.com and someone else links to a page with
www.domain.com. The trouble is, Google will not see these as the same page but rather two separate pagenames named domain.com/pagename.html and
www.domain.com/pagename.html respectively. Consequently, each of these pages will have different PageRank. This could curtail your SEO efforts.
The Solution
You use mod_rewrite to rename the pages automatically when visited by either spider or human. This will funnel your PageRank to the correct page, either
www. or without, your choice.
Requirements
Fair level of internet expertise, at least with FTP.
Admin access to the domain
Apache WebServer.
Mod-rewrite. Ask your webhost if its installed. Many don't have it on by default.
.htaccess. Again ask your webhost if you're not sure. They may have to change their Virtual Host setting to AllowOveride.
First make a backup of .htaccess if one exists. If it doesn't exist, copy and paste the following code:
This is a mod_rewrite rule that will change your pagenames. You can make a fatal error and crash your website with this technique, so make sure you have a backup of .htaccess if there was one, or the ability to quickly delete the one you add, if necessary.
Quote:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.domain\.com
rewriterule (.*) http://www.domain.com/$1 [R=permanent,L]
|
You should be able to copy and paste this example after changing domain.com to your domain name.
Hit refresh in your browser. You should now be able to enter
www.domain.com or domain.com in your browser and be brought to the correct page. You will see the URL change in your address bar due to the rewrite!
