forked from getgrav/grav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add server directives to block access to backup folder
- Loading branch information
Gert
committed
Apr 27, 2015
1 parent
5ccefee
commit e364616
Showing
3 changed files
with
61 additions
and
53 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<system.webServer> | ||
<defaultDocument> | ||
<files> | ||
<remove value="index.php" /> | ||
<add value="index.php" /> | ||
</files> | ||
</defaultDocument> | ||
<rewrite> | ||
<rules> | ||
<rule name="request_filename" 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" /> | ||
</rule> | ||
<rule name="user_accounts" stopProcessing="true"> | ||
<match url="^user/accounts/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="user_config" stopProcessing="true"> | ||
<match url="^user/config/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="user_error_redirect" stopProcessing="true"> | ||
<match url="^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="cache" stopProcessing="true"> | ||
<match url="^cache/(.*)" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="bin" stopProcessing="true"> | ||
<match url="^bin/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="system" stopProcessing="true"> | ||
<match url="^system/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="vendor" stopProcessing="true"> | ||
<match url="^vendor/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
</rules> | ||
</rewrite> | ||
</system.webServer> | ||
</configuration> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<system.webServer> | ||
<defaultDocument> | ||
<files> | ||
<remove value="index.php" /> | ||
<add value="index.php" /> | ||
</files> | ||
</defaultDocument> | ||
<rewrite> | ||
<rules> | ||
<rule name="request_filename" 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" /> | ||
</rule> | ||
<rule name="user_accounts" stopProcessing="true"> | ||
<match url="^user/accounts/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="user_config" stopProcessing="true"> | ||
<match url="^user/config/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="user_error_redirect" stopProcessing="true"> | ||
<match url="^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="cache" stopProcessing="true"> | ||
<match url="^cache/(.*)" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="bin" stopProcessing="true"> | ||
<match url="^bin/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="backup" stopProcessing="true"> | ||
<match url="^backup/(.*)" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="system" stopProcessing="true"> | ||
<match url="^system/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
<rule name="vendor" stopProcessing="true"> | ||
<match url="^vendor/(.*)$" ignoreCase="false" /> | ||
<action type="Redirect" url="error" redirectType="Permanent" /> | ||
</rule> | ||
</rules> | ||
</rewrite> | ||
</system.webServer> | ||
</configuration> |