URL conversion to http to https IIS/WIndows 2012

Hi Experts,

I have few URLs to redirect to https;

http://url1.com to https://www.url1.com
http://url2.com to https://www.url2.com

IIS/windows 2012

Any helpful tips, howtos would be highly appreciated.

Thanks !
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Scott Fell, EE MVEConnect With a Mentor Developer & EE ModeratorCommented:
You can either do this with your server side code or via iis.  Using iis you want the rewrite module https://blogs.msdn.microsoft.com/kaushal/2013/05/22/http-to-https-redirects-on-iis-7-x-and-higher/

You essentially end up with a web.config like
<?xml version="1.0" encoding="UTF-8"?>
        <rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
        <match url="(.*)" />
        <conditions logicalGrouping="MatchAny">
          <add input="{SERVER_PORT_SECURE}" pattern="^1$" />
          <add input="{SERVER_PORT_SECURE}" pattern="^0$" />
        <action type="Redirect" url="https://{HTTP_HOST}/OWA/" redirectType="Permanent" />

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.