-
-
Save jackmcdade/3867022 to your computer and use it in GitHub Desktop.
Statamic IIS rewrite rules for web.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<rewrite> | |
<rules> | |
<rule name="Imported Rule 1" stopProcessing="true"> | |
<match url="^(_app)" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 2" stopProcessing="true"> | |
<match url="^(_cache)" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 3" stopProcessing="true"> | |
<match url="^(_config)" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 4" stopProcessing="true"> | |
<match url="^(_content)" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 5" stopProcessing="true"> | |
<match url="^(.*).yml$" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 6" stopProcessing="true"> | |
<match url="^(.*).yaml$" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 7" stopProcessing="true"> | |
<match url="^(.*/)?\.git+" ignoreCase="false" /> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="Imported Rule 8" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="/index.php" appendQueryString="true" /> | |
</rule> | |
</rules> | |
</rewrite> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment