8

特定のパスを除くすべての https URL に一致する正規表現が必要です。

例えば

マッチ

https://www.domain.com/blog https://www.domain.com

一致しない

https://www.domain.com/forms/

これは私がこれまでに持っているものです:

<rule name="Redirect from HTTPS to HTTP excluding /forms" enabled="true" stopProcessing="true">
    <match url=".*" />
    <conditions>
        <add input="{URL}" pattern="^https://[^/]+(/(?!(forms/|forms$)).*)?$" />
    </conditions>
    <action type="Redirect" url="http://{HTTP_HOST}/{R:0}" redirectType="Permanent" />
</rule>

しかし、うまくいきません

4

4 に答える 4