[TYPO3-ttnews] Force www vs non-www to avoid duplicate content on Google and RealUrl

Trine Buhl trine.buhl at mail.dk
Fri Jun 12 12:29:34 CEST 2009


Hi,

I am looking a solution to force www vs non-www to avoid duplicate 
content on Google which will work with RealUrl.

I have found this snippet, but it dosn't work with my existing 
rewrite-setup in .htaccess.


RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]

My existing .htaccess:

         RewriteEngine On
         RewriteRule ^typo3$ - [L]
         RewriteRule ^typo3/.*$ - [L]
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteCond %{REQUEST_FILENAME} !-d
         RewriteCond %{REQUEST_FILENAME} !-l
         RewriteRule .* index.php

Is it possible to integrate the RealUrl rewrite of filenames with the 
rewrite of http_host?

Is there only a manually solution to go for?

Regards,

Trine


More information about the TYPO3-project-tt-news mailing list