2017-10-13 4 views
0

Ich habe diese Seite "localhost". Ich möchte, dass alle Seiten https haben außer "localhost/order.aspx? R = 15". Problem hier ist es alle Seiten zu HTTPS einschließlich "localhost/order.aspx? R = 15" umleiten. Ich habe auch versucht, das Muster wie "^/localhost/order.aspx $"HTTPS Negate funktioniert nicht

<rule name="Force HTTPS" stopProcessing="true"> 
 
    <match url="(.*)" /> 
 
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
 
    <add input="{HTTPS}" pattern="off" ignoreCase="true" /> 
 
    <add input="{REQUEST_URI}" pattern="(order.*)" ignoreCase="true" negate="true" /> 
 
    </conditions> 
 
    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" /> 
 
    </rule>

Antwort

0

Also ich regelte es. Clear Browser-Cache, wie oft Zeit Browser den HTTPS-Pfad erinnern. und versucht, das HTTPS abzurufen, auch wenn Sie nur HTTP bereitstellen. Ich werde empfehlen, IE zu verwenden, um dies zu testen.

Aktualisieren Sie die Regel wie folgt.

<rule name="NoSSL - folder" enabled="true" stopProcessing="true"> 
 
    <match url="order.*" /> 
 
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
 
    </conditions> 
 
    <action type="None" /> 
 
</rule> 
 
<rule name="Redirect to HTTPS" enabled="true" stopProcessing="true"> 
 
    <match url="(.*)" /> 
 
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> 
 
     <add input="{HTTPS}" pattern="off" /> 
 
    </conditions> 
 
    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" /> 
 
</rule>