Rewriting IIS URL: 403 - Forbidden: Forbidden

I installed the IIS URL Rewrite 2.0 and add a rule to redirect all http links to https. Here is my Web.Config code:

  <rewrite> <rules> <rule name="REdirect To HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" /> </rule> </rules> </rewrite> 

Everything looks great. But when I access my site using http, it gives a 403 error.

 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. 

TLS 1.0 is included with IIS 7.5.

Where can I find out more about what 403 error is?

+6
source share
2 answers

SSL was included in IIS. I just read somewhere that in SSL settings Require SSL needs to be disabled when using URL Rewrite 2.0.

Deselect Require SSL and click Apply. Now it works fine.

+13
source

Not sure if this will help, but I see that your rule is not included.

 <rule name="Redirect to https" enabled="false" stopProcessing="true"> 
0
source

All Articles