Apache: redirect if host doesn't start with www or cdn
My goal is to redirect to domain with www. if both these conditions are met:
current host is not www.example.com
current host is not cdn.example.com
I'm using a .htaccess file with this code, but the second condition is not
honoured:
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^cdn\.example\.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Thank you
No comments:
Post a Comment