contao/import — Issue #3249: name to redirect requests without "www" to the correct domain
Author: importer
Created: 2011-11-29 21:11:25+00:00
State: open
Labels: Feature, frontend

file: .htaccess (98)

from:
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

to:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

you dont have to change it every time and it's multidomain safe
should be turned on if you generate xml sitemaps, because if you log in the backend without www. the generated sitemaps are different to what the google webmastertools expect

Related issues: #3522

--- _Originally created by inred on July 8th, 2011, at 11:12am (ID 3249)_