Rewriteengine - .htaccess url rewrite non-www to www


#1

I have found that a standard .htaccess rewrite to avoid canonical issues prevents piwik from tracking referers or pageviews. This is what I put in my .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^theeasyfrench.com
RewriteRule (.*) http://www.theeasyfrench.com/$1 [R=301,L]

It works as intended except it messes up piwik. As soon as I take it out referrers and pageviews are tracked again. Anyone know of a workaround for this problem?