<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="InvalidQueryString" stopProcessing="true">
<match url="^/?$" />
<conditions>
<add input="{QUERY_STRING}" pattern="^.+$" />
</conditions>
<action type="AbortRequest" />
</rule>
<rule name="reIndex" stopProcessing="true">
<match url="^(.*)$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?p={R:1}" appendQueryString="true" />
</rule>
<rule name="Add www" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{HTTP_HOST}" pattern="www.abc.com" negate="true" />
</conditions>
<action type="Redirect" url="https://www.abc.com/{R:1}" />
</rule>
<rule name="http转https" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>