Created
January 28, 2019 23:16
-
-
Save TrywaR/8d36bbc23377e5abf1bec5b9b73b6605 to your computer and use it in GitHub Desktop.
Default Web.Config for MODX Rev
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<directoryBrowse enabled="false" /> | |
<defaultDocument> | |
<files> | |
<clear /> | |
<add value="index.php" /> | |
<add value="Default.htm" /> | |
<add value="Default.asp" /> | |
<add value="index.htm" /> | |
<add value="Default.aspx" /> | |
</files> | |
</defaultDocument> | |
<rewrite> | |
<rules> | |
<rule name="Add WWW prefix" > | |
<match url="(.*)" ignoreCase="true" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^example\.com" /> | |
</conditions> | |
<action type="Redirect" url="http://www.example.com/{R:1}" | |
redirectType="Permanent" /> | |
</rule> | |
<rule name="ModX IIS7 Rule 1" stopProcessing="true"> | |
<match url=".*" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{HTTP_USER_AGENT}" pattern="^.*internal\ dummy\ connection.*$" /> | |
</conditions> | |
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> | |
</rule> | |
<rule name="ModX IIS7 Rule 2" stopProcessing="true"> | |
<match url="^(manager|assets)" ignoreCase="false" /> | |
<action type="None" /> | |
</rule> | |
<rule name="ModX IIS7 Rule 3" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" /> | |
</conditions> | |
<action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.example.com/ - replace on actual website name