Website unaccessible under some circumstances when using seo redirection *.domain to www.domain
Setting seo redirect to *. -> www.domain.de creates a rewrite rule like this:
RewriteCond %{HTTP_HOST} !^www.domain.de$ [NC] RewriteRule ^(.*)$ http://www.domain.de$1 [R=301,L]
If above domain is an aliasdomain to a website mydomain.com this will be unaccessible, because: RewriteCond %{HTTP_HOST} !^www.domain.de$ [NC] does also match www.mydomain.com or mydomain.com
Rewrite rule should be changed to use two conditions: RewriteCond %{HTTP_HOST} .domain.de$ [NC] RewriteCond %{HTTP_HOST} !^www.domain.de$ [NC]
Same for .* => domain (without www) RewriteCond %{HTTP_HOST} .domain.de$ [NC] RewriteCond %{HTTP_HOST} !^domain.de$ [NC]