-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathweb.config.dist
60 lines (52 loc) · 2.24 KB
/
web.config.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<!--
RESTfm Microsoft IIS 7.0 web.config file.
RESTfm requires the URL rewrite module available from Microsoft:
http://www.iis.net/download/urlrewrite
-->
<configuration>
<system.webServer>
<security>
<requestFiltering>
<hiddenSegments>
<!-- Block access to .git directories. -->
<add segment=".git" />
<!-- Block access to .svn directories. -->
<add segment=".svn" />
</hiddenSegments>
<fileExtensions>
<!-- Block access to *.ini files. -->
<add fileExtension="*.ini" allowed="false" />
</fileExtensions>
</requestFiltering>
</security>
<!--
This <rewrite> section requires the URL rewrite module available from Microsoft:
http://www.iis.net/download/urlrewrite
-->
<rewrite>
<rules>
<!-- Uncomment block to enforce SSL with redirect.
<rule name="Redirect to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
-->
<!-- Rewrite all URLs to RESTfm.php -->
<rule name="RESTfm root rewrite rules" stopProcessing="true">
<match url=".*" ignoreCase="false" />
<conditions>
<add input="{URL}" pattern="RESTfm\.php$" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="RESTfm.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<!-- Ensure RESTfm custom error responses are visible. -->
<httpErrors existingResponse="PassThrough" />
</system.webServer>
</configuration>