I have a server with IIS 7.5 with the URL Rewrite module installed. I'm able to redirect http://www.mydomain.com to https://mydomain.com. Note HTTPS; secure.
However, if a user enters the secure url https://www.mydomain.com I'm not able to remove www! How come?
I would like a regex method to do this, so It can be a general solution instead of a hard coded one.
My general regex pattern is (.*)
And for my conditions, I have only one: {HTTP_HOST} , type: Matches the pattern, Pattern: ^(www.)(.*)$
My redirect url is: https://{C:2}/{R:0}