Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS URL Rewrite : 403 - Forbidden: Access is denied

I installed 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 fine. But when I access my website using http, it throws 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 enabled with IIS 7.5.

Where I can get more info on exactly what type of 403 error it is?

like image 201
Abdul Avatar asked Jun 03 '16 11:06

Abdul


People also ask

How do I disable URL Rewrite in IIS?

Open Internet Information Services (IIS) Manager > Servername > Sites > example.com > URL rewrite. Select each rewrite rule and disable them by clicking on Disable Rule.


1 Answers

SSL was enabled in IIS. I just read somewhere that in SSL Settings Require SSL need to be unchecked when using URL Rewrite 2.0.

I deselect the Require SSL and click Apply. Its working fine now.

like image 165
Abdul Avatar answered Sep 28 '22 12:09

Abdul