-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdummy_web.config
122 lines (120 loc) · 7.7 KB
/
dummy_web.config
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=edge" />
<add name="Cache-Control" value="Public" />
</customHeaders>
</httpProtocol>
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
<rewrite>
<rules>
<clear />
<rule name="env" patternSyntax="ExactMatch">
<match url="2332523656626525255535325" negate="true" />
<serverVariables>
<set name="TYPO3_PATH_APP" value="D:\htdocs\[YOUR_PATH].localhost" />
<set name="TYPO3_PATH_ROOT" value="D:\htdocs\[YOUR_PATH].localhost\public" />
<set name="TYPO3_CONTEXT" value="Development" />
</serverVariables>
<action type="None" />
</rule>
<!-- <rule name="SecureRedirectWwwToNonWww" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{HTTPS}" pattern="off" />
<add input="{HTTP_HOST}" pattern="^www\.(.*)$" />
</conditions>
<action type="Redirect" url="http://{C:1}" redirectType="Permanent" />
</rule> -->
<!-- <rule name="SecureRedirectNonWwwToWww" stopProcessing="true">
<match url="^.*$" />
<conditions>
<add input="{HTTPS}" pattern="off" />
<add input="{HTTP_HOST}" pattern="^www\.(.*)$" negate="true" />
</conditions>
<action type="Redirect" url="http://{C:0}" redirectType="Temporary" />
</rule> -->
<rule name="TYPO3 - Block access to composer files">
<match url="composer\.(?:json|lock)" ignoreCase="true" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to flexform files">
<match url="flexform[^.]*\.xml" ignoreCase="true" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to language files">
<match url="locallang[^.]*\.(?:xml|xlf)$" ignoreCase="true" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to static typoscript files">
<match url="ext_conf_template\.txt|ext_typoscript_constants\.txt|ext_typoscript_setup\.txt" ignoreCase="true" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to miscellaneous protected files">
<match url="/.*\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql|sqlite)$" ignoreCase="true" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to recycler and temporary directories">
<match url="_(?:recycler|temp)_/" ignoreCase="false" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to configuration files stored in fileadmin">
<match url="fileadmin/(?:templates)/.*\.(?:txt|ts)$" ignoreCase="false" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to libraries, source and temporary compiled data">
<match url="^(?:vendor|typo3_src|typo3temp/var)" ignoreCase="false" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Block access to protected extension directories">
<match url="(?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/" ignoreCase="false" />
<action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="TYPO3 - Static File Directories" stopProcessing="true">
<match url="^/(typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php|favicon\.ico)$" />
<action type="None" />
</rule>
<!-- BEGIN: TYPO3 automated migration -->
<rule name="TYPO3 - If the file/directory does not exist but is below /typo3/, redirect to the TYPO3 Backend entry point." stopProcessing="true">
<match url="^typo3/(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" matchType="Pattern" pattern="^/typo3/.*$" />
</conditions>
<action type="Rewrite" url="typo3/index.php" appendQueryString="true" />
</rule>
<!-- END: TYPO3 automated migration -->
<rule name="TYPO3 - Version Number in File Name (if set)" stopProcessing="true">
<match url="^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$" 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="{R:1}.{R:3}" />
</rule>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^index\.php$" ignoreCase="false" />
<action type="None" />
</rule>
<rule name="Redirect Image to HTTP" stopProcessing="true">
<match url=".*\.(gif|jpg|jpeg|png|css|js|svg)$" ignoreCase="true" />
<action type="Rewrite" url="{R:0}" />
</rule>
<rule name="TYPO3 - If the file/directory does not exist => Redirect to index.php." stopProcessing="true">
<match url="^.*$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<staticContent>
<clientCache cacheControlMode="NoControl" cacheControlMaxAge="8.00:00:00" />
</staticContent>
</system.webServer>
</configuration>