Old domain to new domain and HTTPS

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Old domain to new domain and HTTPS

07 May 2013, 13:45

Hi,

I am using this code below to redirect an old domain to a new domain and it works great. However when someone types https://olddomain.com it does not redirect. Instead it is going to port 443 with that domain name and getting a certificate mismatch.

Is there a way around this? Maybe a way to redirect all https://olddmain.com to https://newdomain.com ?

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

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

Thank You!

John

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Old domain to new domain and HTTPS

08 May 2013, 00:37

Hello,

Well, 443 is SSL issue. SSL certificate check happens when the connection is being established. Only then it goes to ISAPI_Rewrite and IIS.
So the error will show regardless of the rules. You need to fix SSL issue first, and then the rule can be used. BTW, the rule looks good to me.

Regards
Andrew

User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Re: Old domain to new domain and HTTPS

08 May 2013, 10:26

Ok, thats odd.

I have a valid SSL certificate for the new domain, but for some reason if you go to the old domain with HTTPS you will get the security warning- but only in Firefox. All other browsers will redirect properly before getting to that warning. I was hoping that there was a way to redirect the URL when someone goes to it with HTTPS but I guess I will have to find another solution.

Thanks,

John

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 18 guests