Svenska (Sverige)English (United Kingdom)
Start Webb .htaccess How do I forward my visitors regardless of which domain they write to address "www.mydomain.se"

How do I forward my visitors regardless of which domain they write to address "www.mydomain.se"

Add following lines to .htaccess:

1
2
3
RewriteEngine On
RewriteCond %{HTTP_HOST} !www\.mindomän\.se
RewriteRule ^(.*)$ http://www.mindomän.se/$1 [R=permanent,L

Remember that \ before dot in RewriteCond is a must, but should not be part of RewriteRule