Wednesday, August 21, 2013

301 redrict - ssl https://www.domain.com to https://domain.com without wildcard

301 redrict - ssl https://www.domain.com to https://domain.com without
wildcard

my SSL Certificate only supports domain.com NOT www.domain.com.
So I would like to redrict from https:// www. domain .com to https://
domain .com.
The problem is, it doesnt work. No matter if i try it via. the apache site
config or htaccess. The redrictions from http work perfect.
Is it loading the Certificate first and so if none exists for this domain
it doesnt redrict ?
RewriteEngine On
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^www\.meinedomain\.de$ [NC]
RewriteRule ^(.*) https://meinedomain.de/$1 [L,R=301]

No comments:

Post a Comment