301 redirect to www and https for specific domain

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 8
Joined: 06 May 2016, 16:24

301 redirect to www and https for specific domain

11 Sep 2023, 18:21

I can't seem to figure this out. I would like create a rule that will 301 redirect non-www and non-https traffic to the https://www.mydomain.com - while passing entire path and querystring.

So these three instances would be covered.
http://mydomain.com > 301 redirect > https://www.mydomain.com
http://www.mydomain.com > 301 redirect > https://www.mydomain.com
https://mydomain.com > 301 redirect > https://www.mydomain.com

Thank you!

User avatar
Posts: 8
Joined: 06 May 2016, 16:24

Re: 301 redirect to www and https for specific domain

11 Sep 2023, 19:32

Please note that I have other subdomains that I do not redirected to www. For instance ca.mydomain.com (I do not want it to redirect to www.ca.mydomain.com).

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 16 guests