HTTP to HTTPS redirect is not working

amjadmapari used Ask the Experts™

I am trying to redirect a IIS 8.0 URL from HTTP to HTTPS. Have installed URL redirect and followed below articles.
But still getting error. Can you please help.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Use this for your web.config file.  Create a file in the directory that you want to be HTTPS and name the file "web.config" and add it to the directory.
<?xml version="1.0" encoding="UTF-8"?>
<httpErrors errorMode="Detailed"/>
      <rule name="Redirect to HTTPS" stopProcessing="true">
        <match url=".*" />

          <add input="{HTTP_CLUSTER_HTTPS}" pattern="^on$" negate="true" />
          <add input="{HTTP_CLUSTER_HTTPS}" pattern=".+" negate="true" />

        <action type="Redirect" url="https://{HTTP_HOST}{SCRIPT_NAME}" redirectType="SeeOther" />


Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial