My website is set up so that http://mysite.com is the homepage and thats where I want all my visitors to go so it gets tracked on one tracker. The problem is ive got people typing www on the front so all my traffic isnt on one chart. Is there a way to redirect www traffic to just http://mysite.com so I can view all traffic on one page?
RewriteCond %{HTTP_HOST} !^site\.com$ [NC] RewriteRule (.*) http://site.com/$1 [L,R=301] Code (markup): (from topic) Put that in a .htaccess file in the public_html or www folder (i.e. would be at site.com/.htaccess)
"Well" you have to make sure you're setup for rewriting before using rewrite rules. And I assume you changed site.com to your domain. The whole thing then: Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} !^site\.com$ [NC] RewriteRule (.*) http://site.com/$1 [L,R=301] Code (markup):