looking for some solutions? You are welcome.

SOLVED: Rewrite rule not working for redirection from http to https

Abhiraj Shinde:

Tried below code but it's not working, entered rewrite tag in system.webServer tag in web.config file of c# , Shows error rewrite can not be child element of system.webServer tag

<rewrite>
      <rules>
        <rule name="Rule1" enabled="true" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTPS}" pattern="^OFF$" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent