generator-razor 3.2.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/index.js +76 -12
- package/app/templates/104/_.htaccess-dev +1 -1
- package/app/templates/104/_.htaccess-dev-ssl +1 -1
- package/app/templates/115/_.htaccess-dev +17 -4
- package/app/templates/115/_.htaccess-dev-ssl +17 -4
- package/app/templates/124/_.htaccess-dev +692 -0
- package/app/templates/124/_.htaccess-dev-ssl +692 -0
- package/app/templates/124/db.sql +1757 -0
- package/app/templates/124/fileadmin/.htaccess +4 -0
- package/app/templates/124/fileadmin/_temp_/.htaccess +15 -0
- package/app/templates/124/fileadmin/_temp_/index.html +7 -0
- package/app/templates/124/fileadmin/user_upload/.htaccess +33 -0
- package/app/templates/124/fileadmin/user_upload/_temp_/importexport/.htaccess +15 -0
- package/app/templates/124/fileadmin/user_upload/_temp_/importexport/index.html +7 -0
- package/app/templates/124/fileadmin/user_upload/_temp_/index.html +0 -0
- package/app/templates/124/fileadmin/user_upload/index.html +0 -0
- package/app/templates/124/typo3conf/PackageStates.php +91 -0
- package/app/templates/124/typo3conf/system/local.php +9 -0
- package/app/templates/124/typo3conf/system/settings.php +118 -0
- package/app/templates/124/typo3temp/index.html +0 -0
- package/app/templates/124/typo3temp/var/.htaccess +15 -0
- package/app/templates/124/typo3temp/var/log/.htaccess +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------------
|
|
2
|
+
# | Local development (Docker) |
|
|
3
|
+
# ------------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
<FilesMatch \.php$>
|
|
6
|
+
SetHandler proxy:fcgi://php81:9000
|
|
7
|
+
</FilesMatch>
|
|
8
|
+
|
|
9
|
+
# ------------------------------------------------------------------------------
|
|
10
|
+
# | Local development (MAMP) |
|
|
11
|
+
# ------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
# <IfModule mod_mime.c>
|
|
14
|
+
# RemoveHandler .php
|
|
15
|
+
# RemoveType .php
|
|
16
|
+
# <FilesMatch ".+\.php$">
|
|
17
|
+
# AddHandler php-fastcgi .php
|
|
18
|
+
# </FilesMatch>
|
|
19
|
+
# </IfModule>
|
|
20
|
+
|
|
21
|
+
# ------------------------------------------------------------------------------
|
|
22
|
+
# | TYPO3 application context |
|
|
23
|
+
# ------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
# SetEnv TYPO3_CONTEXT Development
|
|
26
|
+
|
|
27
|
+
# ------------------------------------------------------------------------------
|
|
28
|
+
# | Maintenance mode |
|
|
29
|
+
# ------------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
# <IfModule mod_rewrite.c>
|
|
32
|
+
# RewriteEngine on
|
|
33
|
+
# RewriteCond %{REMOTE_HOST} !^111\.222\.333\.444
|
|
34
|
+
# RewriteCond %{HTTP:X-FORWARDED-FOR} !^111\.222\.333\.444
|
|
35
|
+
# RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
|
|
36
|
+
# RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
|
|
37
|
+
# # RewriteRule (IP) /x%{HTTP:X-FORWARDED-FOR}x [R,L]
|
|
38
|
+
# RewriteRule .* /maintenance.html [R=302,L]
|
|
39
|
+
# </IfModule>
|
|
40
|
+
|
|
41
|
+
# ------------------------------------------------------------------------------
|
|
42
|
+
# | Browserupdate |
|
|
43
|
+
# ------------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
RewriteCond %{HTTP_USER_AGENT} "Mozilla.*Gecko.*Firefox/([1-9]|[1-2][0-9])[^0-9]" [NC,OR]
|
|
46
|
+
RewriteCond %{HTTP_USER_AGENT} "^Firefox[\/\s]([1-9]|[1-2][0-9])[^0-9]" [NC,OR]
|
|
47
|
+
RewriteCond %{HTTP_USER_AGENT} "AppleWebKit.*Version\/[1-8]\.[0-9\.]*\ Safari" [NC,OR]
|
|
48
|
+
RewriteCond %{HTTP_USER_AGENT} "AppleWebKit.*Version\/[1-8]\.[0-9\.]*\ Mobile\/[A-z0-9]+\ Safari" [NC,OR]
|
|
49
|
+
RewriteCond %{HTTP_USER_AGENT} (MSIE|Trident) [NC]
|
|
50
|
+
RewriteRule .* browser-support.html [L]
|
|
51
|
+
|
|
52
|
+
# ----------------------------------------------------------------------
|
|
53
|
+
# | Keep alive |
|
|
54
|
+
# ----------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
<IfModule mod_headers.c>
|
|
57
|
+
Header set Connection keep-alive
|
|
58
|
+
</IfModule>
|
|
59
|
+
|
|
60
|
+
# ----------------------------------------------------------------------
|
|
61
|
+
# | Vary |
|
|
62
|
+
# ----------------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
<IfModule mod_headers.c>
|
|
65
|
+
<FilesMatch ".(js|css|xml|gz|html)$">
|
|
66
|
+
Header append Vary: Accept-Encoding
|
|
67
|
+
</FilesMatch>
|
|
68
|
+
</IfModule>
|
|
69
|
+
|
|
70
|
+
# ----------------------------------------------------------------------
|
|
71
|
+
# | Enforce trailing slash. Ignore trailing slash on file endings |
|
|
72
|
+
# ----------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
# <IfModule mod_rewrite.c>
|
|
75
|
+
# RewriteBase /
|
|
76
|
+
# RewriteCond %{REQUEST_FILENAME} !-f
|
|
77
|
+
# RewriteCond %{REQUEST_FILENAME} !-d
|
|
78
|
+
# RewriteCond %{REQUEST_URI} !(.*)/$
|
|
79
|
+
# RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|js|xml|rss|json|txt|yaml|yml)$ [NC]
|
|
80
|
+
# RewriteCond %{REQUEST_URI} !\.(gif|jpg|png|jpeg|css|js|xml|rss|json|txt|yaml|yml)$ [NC]
|
|
81
|
+
# RewriteRule ^(.*[^/])$ /$1/ [L,R=301]
|
|
82
|
+
# </IfModule>
|
|
83
|
+
|
|
84
|
+
# ----------------------------------------------------------------------
|
|
85
|
+
# | webp support |
|
|
86
|
+
# ----------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
# <IfModule mod_rewrite.c>
|
|
89
|
+
# RewriteEngine On
|
|
90
|
+
# RewriteCond %{HTTP_ACCEPT} image/webp
|
|
91
|
+
# RewriteCond %{DOCUMENT_ROOT}/$1.$3.webp -f
|
|
92
|
+
# RewriteRule ^((fileadmin|other-storage)/.+)\.(png|jpg|jpeg)$ $1.$3.webp [L]
|
|
93
|
+
# </IfModule>
|
|
94
|
+
|
|
95
|
+
# <IfModule mod_headers.c>
|
|
96
|
+
# Header append Vary Accept env=REDIRECT_accept
|
|
97
|
+
# </IfModule>
|
|
98
|
+
|
|
99
|
+
# ----------------------------------------------------------------------
|
|
100
|
+
# | Forcing the `www.` at the beginning of URLs |
|
|
101
|
+
# ----------------------------------------------------------------------
|
|
102
|
+
|
|
103
|
+
# RewriteCond %{HTTP_HOST} ^mywebsite\.com$ [NC]
|
|
104
|
+
# RewriteRule ^(.*)$ http://www\.mywebsite\.com/$1 [R=301,L]
|
|
105
|
+
|
|
106
|
+
# ----------------------------------------------------------------------
|
|
107
|
+
# | No `www.` at the beginning of URLs |
|
|
108
|
+
# ----------------------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
# RewriteCond %{HTTP_HOST} ^www.subdomain\.mywebsite\.com [NC]
|
|
111
|
+
# RewriteRule ^(.*)$ http://subdomain\.mywebsite\.com/$1 [R=301,L]
|
|
112
|
+
|
|
113
|
+
# ----------------------------------------------------------------------
|
|
114
|
+
# | Forcing `https://` |
|
|
115
|
+
# ----------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
# Redirect from the `http://` to the `https://` version of the URL.
|
|
118
|
+
# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
|
|
119
|
+
|
|
120
|
+
# <IfModule mod_rewrite.c>
|
|
121
|
+
# RewriteEngine On
|
|
122
|
+
# RewriteCond %{HTTPS} !=on
|
|
123
|
+
# RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
|
|
124
|
+
# RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
|
125
|
+
# </IfModule>
|
|
126
|
+
|
|
127
|
+
# ----------------------------------------------------------------------
|
|
128
|
+
# | TYPO3 |
|
|
129
|
+
# ----------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
#####
|
|
132
|
+
#
|
|
133
|
+
# Example .htaccess file for TYPO3 CMS - for use with Apache Webserver
|
|
134
|
+
#
|
|
135
|
+
# This file includes settings for the following configuration options:
|
|
136
|
+
#
|
|
137
|
+
# - Compression
|
|
138
|
+
# - Caching
|
|
139
|
+
# - MIME types
|
|
140
|
+
# - Cross Origin requests
|
|
141
|
+
# - Rewriting and Access
|
|
142
|
+
# - Miscellaneous
|
|
143
|
+
# - PHP optimisation
|
|
144
|
+
#
|
|
145
|
+
# If you want to use it, you have to copy it to the root folder of your TYPO3 installation (if its
|
|
146
|
+
# not there already) and rename it to '.htaccess'. To make .htaccess files work, you might need to
|
|
147
|
+
# adjust the 'AllowOverride' directive in your Apache configuration file.
|
|
148
|
+
#
|
|
149
|
+
# IMPORTANT: You may need to change this file depending on your TYPO3 installation!
|
|
150
|
+
# Consider adding this file's content to your webserver's configuration directly for speed improvement
|
|
151
|
+
#
|
|
152
|
+
# Lots of the options are taken from https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess
|
|
153
|
+
#
|
|
154
|
+
####
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Begin: Compression ###
|
|
158
|
+
|
|
159
|
+
# Compressing resource files will save bandwidth and so improve loading speed especially for users
|
|
160
|
+
# with slower internet connections. TYPO3 can compress the .js and .css files for you.
|
|
161
|
+
# *) Uncomment the following lines and
|
|
162
|
+
# *) Set $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = 9 for the Backend
|
|
163
|
+
# *) Set $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 9 together with the TypoScript properties
|
|
164
|
+
# config.compressJs and config.compressCss for GZIP compression of Frontend JS and CSS files.
|
|
165
|
+
|
|
166
|
+
<FilesMatch "\.js\.gzip$">
|
|
167
|
+
AddType "text/javascript" .gzip
|
|
168
|
+
</FilesMatch>
|
|
169
|
+
<FilesMatch "\.css\.gzip$">
|
|
170
|
+
AddType "text/css" .gzip
|
|
171
|
+
</FilesMatch>
|
|
172
|
+
AddEncoding gzip .gzip
|
|
173
|
+
|
|
174
|
+
<IfModule mod_deflate.c>
|
|
175
|
+
# Force compression for mangled `Accept-Encoding` request headers
|
|
176
|
+
<IfModule mod_setenvif.c>
|
|
177
|
+
<IfModule mod_headers.c>
|
|
178
|
+
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
|
|
179
|
+
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
|
|
180
|
+
</IfModule>
|
|
181
|
+
</IfModule>
|
|
182
|
+
|
|
183
|
+
# Compress all output labeled with one of the following media types.
|
|
184
|
+
#
|
|
185
|
+
# (!) For Apache versions below version 2.3.7 you don't need to
|
|
186
|
+
# enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
|
|
187
|
+
# and `</IfModule>` lines as `AddOutputFilterByType` is still in
|
|
188
|
+
# the core directives.
|
|
189
|
+
#
|
|
190
|
+
# https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
|
|
191
|
+
|
|
192
|
+
<IfModule mod_filter.c>
|
|
193
|
+
AddOutputFilterByType DEFLATE application/atom+xml \
|
|
194
|
+
application/javascript \
|
|
195
|
+
application/json \
|
|
196
|
+
application/ld+json \
|
|
197
|
+
application/manifest+json \
|
|
198
|
+
application/rdf+xml \
|
|
199
|
+
application/rss+xml \
|
|
200
|
+
application/schema+json \
|
|
201
|
+
application/vnd.geo+json \
|
|
202
|
+
application/geo+json \
|
|
203
|
+
application/vnd.ms-fontobject \
|
|
204
|
+
application/x-font-ttf \
|
|
205
|
+
application/x-javascript \
|
|
206
|
+
application/x-web-app-manifest+json \
|
|
207
|
+
application/xhtml+xml \
|
|
208
|
+
application/xml \
|
|
209
|
+
font/eot \
|
|
210
|
+
font/opentype \
|
|
211
|
+
font/otf \
|
|
212
|
+
font/ttf \
|
|
213
|
+
image/bmp \
|
|
214
|
+
image/svg+xml \
|
|
215
|
+
image/vnd.microsoft.icon \
|
|
216
|
+
image/x-icon \
|
|
217
|
+
text/cache-manifest \
|
|
218
|
+
text/css \
|
|
219
|
+
text/html \
|
|
220
|
+
text/javascript \
|
|
221
|
+
text/plain \
|
|
222
|
+
text/vcard \
|
|
223
|
+
text/vnd.rim.location.xloc \
|
|
224
|
+
text/vtt \
|
|
225
|
+
text/x-component \
|
|
226
|
+
text/x-cross-domain-policy \
|
|
227
|
+
text/xml
|
|
228
|
+
</IfModule>
|
|
229
|
+
|
|
230
|
+
<IfModule mod_mime.c>
|
|
231
|
+
AddEncoding gzip svgz
|
|
232
|
+
</IfModule>
|
|
233
|
+
</IfModule>
|
|
234
|
+
|
|
235
|
+
### End: Compression ###
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
### Begin: Browser caching of resource files ###
|
|
240
|
+
|
|
241
|
+
# This affects Frontend and Backend and increases performance.
|
|
242
|
+
<IfModule mod_expires.c>
|
|
243
|
+
|
|
244
|
+
ExpiresActive on
|
|
245
|
+
ExpiresDefault "access plus 1 month"
|
|
246
|
+
|
|
247
|
+
ExpiresByType text/css "access plus 1 year"
|
|
248
|
+
|
|
249
|
+
ExpiresByType application/json "access plus 0 seconds"
|
|
250
|
+
ExpiresByType application/ld+json "access plus 0 seconds"
|
|
251
|
+
ExpiresByType application/schema+json "access plus 0 seconds"
|
|
252
|
+
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
|
|
253
|
+
ExpiresByType application/geo+json "access plus 0 seconds"
|
|
254
|
+
ExpiresByType application/xml "access plus 0 seconds"
|
|
255
|
+
ExpiresByType text/xml "access plus 0 seconds"
|
|
256
|
+
|
|
257
|
+
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
|
|
258
|
+
ExpiresByType image/x-icon "access plus 1 week"
|
|
259
|
+
|
|
260
|
+
ExpiresByType text/x-component "access plus 1 month"
|
|
261
|
+
|
|
262
|
+
ExpiresByType text/html "access plus 0 seconds"
|
|
263
|
+
|
|
264
|
+
ExpiresByType application/javascript "access plus 1 year"
|
|
265
|
+
ExpiresByType application/x-javascript "access plus 1 year"
|
|
266
|
+
ExpiresByType text/javascript "access plus 1 year"
|
|
267
|
+
|
|
268
|
+
ExpiresByType application/manifest+json "access plus 1 week"
|
|
269
|
+
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
|
|
270
|
+
ExpiresByType text/cache-manifest "access plus 0 seconds"
|
|
271
|
+
|
|
272
|
+
ExpiresByType audio/ogg "access plus 1 month"
|
|
273
|
+
ExpiresByType image/apng "access plus 1 month"
|
|
274
|
+
ExpiresByType image/avif "access plus 1 month"
|
|
275
|
+
ExpiresByType image/avif-sequence "access plus 1 month"
|
|
276
|
+
ExpiresByType image/bmp "access plus 1 year"
|
|
277
|
+
ExpiresByType image/gif "access plus 1 year"
|
|
278
|
+
ExpiresByType image/jpeg "access plus 1 year"
|
|
279
|
+
ExpiresByType image/jxl "access plus 1 month"
|
|
280
|
+
ExpiresByType image/png "access plus 1 year"
|
|
281
|
+
ExpiresByType image/svg+xml "access plus 1 month"
|
|
282
|
+
ExpiresByType image/webp "access plus 1 month"
|
|
283
|
+
ExpiresByType video/mp4 "access plus 1 month"
|
|
284
|
+
ExpiresByType video/ogg "access plus 1 month"
|
|
285
|
+
ExpiresByType video/webm "access plus 1 month"
|
|
286
|
+
|
|
287
|
+
ExpiresByType application/atom+xml "access plus 1 hour"
|
|
288
|
+
ExpiresByType application/rdf+xml "access plus 1 hour"
|
|
289
|
+
ExpiresByType application/rss+xml "access plus 1 hour"
|
|
290
|
+
|
|
291
|
+
ExpiresByType font/collection "access plus 1 month"
|
|
292
|
+
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
|
|
293
|
+
ExpiresByType font/eot "access plus 1 month"
|
|
294
|
+
ExpiresByType font/opentype "access plus 1 month"
|
|
295
|
+
ExpiresByType font/otf "access plus 1 month"
|
|
296
|
+
ExpiresByType application/x-font-ttf "access plus 1 month"
|
|
297
|
+
ExpiresByType font/ttf "access plus 1 month"
|
|
298
|
+
ExpiresByType application/font-woff "access plus 1 month"
|
|
299
|
+
ExpiresByType application/x-font-woff "access plus 1 month"
|
|
300
|
+
ExpiresByType font/woff "access plus 1 month"
|
|
301
|
+
ExpiresByType application/font-woff2 "access plus 1 month"
|
|
302
|
+
ExpiresByType font/woff2 "access plus 1 month"
|
|
303
|
+
|
|
304
|
+
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
|
305
|
+
|
|
306
|
+
</IfModule>
|
|
307
|
+
|
|
308
|
+
### End: Browser caching of resource files ###
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### Begin: MIME types ###
|
|
312
|
+
|
|
313
|
+
# Proper MIME types for all files
|
|
314
|
+
<IfModule mod_mime.c>
|
|
315
|
+
# Security configuration
|
|
316
|
+
RemoveType .html .htm
|
|
317
|
+
<FilesMatch ".+\.html?$">
|
|
318
|
+
AddType text/html .html .htm
|
|
319
|
+
</FilesMatch>
|
|
320
|
+
|
|
321
|
+
RemoveType .svg .svgz
|
|
322
|
+
<FilesMatch ".+\.svgz?$">
|
|
323
|
+
AddType image/svg+xml .svg .svgz
|
|
324
|
+
</FilesMatch>
|
|
325
|
+
|
|
326
|
+
# Data interchange
|
|
327
|
+
AddType application/atom+xml atom
|
|
328
|
+
AddType application/json json map topojson
|
|
329
|
+
AddType application/ld+json jsonld
|
|
330
|
+
AddType application/rss+xml rss
|
|
331
|
+
AddType application/vnd.geo+json geojson
|
|
332
|
+
AddType application/xml rdf xml
|
|
333
|
+
|
|
334
|
+
# JavaScript
|
|
335
|
+
AddType application/javascript js
|
|
336
|
+
|
|
337
|
+
# Manifest files
|
|
338
|
+
AddType application/manifest+json webmanifest
|
|
339
|
+
AddType application/x-web-app-manifest+json webapp
|
|
340
|
+
AddType text/cache-manifest appcache
|
|
341
|
+
|
|
342
|
+
# Media files
|
|
343
|
+
|
|
344
|
+
AddType audio/mp4 f4a f4b m4a
|
|
345
|
+
AddType audio/ogg oga ogg opus
|
|
346
|
+
AddType image/avif avif
|
|
347
|
+
AddType image/avif-sequence avifs
|
|
348
|
+
AddType image/bmp bmp
|
|
349
|
+
AddType image/jxl jxl
|
|
350
|
+
AddType image/webp webp
|
|
351
|
+
AddType video/mp4 f4v f4p m4v mp4
|
|
352
|
+
AddType video/ogg ogv
|
|
353
|
+
AddType video/webm webm
|
|
354
|
+
AddType video/x-flv flv
|
|
355
|
+
AddType image/x-icon cur ico
|
|
356
|
+
|
|
357
|
+
# Web fonts
|
|
358
|
+
AddType font/woff woff
|
|
359
|
+
AddType font/woff2 woff2
|
|
360
|
+
AddType application/vnd.ms-fontobject eot
|
|
361
|
+
AddType font/ttf ttc ttf
|
|
362
|
+
AddType font/otf otf
|
|
363
|
+
|
|
364
|
+
# Other
|
|
365
|
+
AddType application/octet-stream safariextz
|
|
366
|
+
AddType application/x-bb-appworld bbaw
|
|
367
|
+
AddType application/x-chrome-extension crx
|
|
368
|
+
AddType application/x-opera-extension oex
|
|
369
|
+
AddType application/x-xpinstall xpi
|
|
370
|
+
AddType text/vcard vcard vcf
|
|
371
|
+
AddType text/vnd.rim.location.xloc xloc
|
|
372
|
+
AddType text/vtt vtt
|
|
373
|
+
AddType text/x-component htc
|
|
374
|
+
|
|
375
|
+
</IfModule>
|
|
376
|
+
|
|
377
|
+
# UTF-8 encoding
|
|
378
|
+
AddDefaultCharset utf-8
|
|
379
|
+
<IfModule mod_mime.c>
|
|
380
|
+
AddCharset utf-8 .atom .css .js .json .manifest .rdf .rss .vtt .webapp .webmanifest .xml
|
|
381
|
+
</IfModule>
|
|
382
|
+
|
|
383
|
+
### End: MIME types ###
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
### Begin: Cross Origin ###
|
|
388
|
+
|
|
389
|
+
# Send the CORS header for images when browsers request it.
|
|
390
|
+
<IfModule mod_setenvif.c>
|
|
391
|
+
<IfModule mod_headers.c>
|
|
392
|
+
<FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
|
|
393
|
+
SetEnvIf Origin ":" IS_CORS
|
|
394
|
+
Header set Access-Control-Allow-Origin "*" env=IS_CORS
|
|
395
|
+
</FilesMatch>
|
|
396
|
+
</IfModule>
|
|
397
|
+
</IfModule>
|
|
398
|
+
|
|
399
|
+
# Allow cross-origin access to web fonts.
|
|
400
|
+
<IfModule mod_headers.c>
|
|
401
|
+
<FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
|
|
402
|
+
Header set Access-Control-Allow-Origin "*"
|
|
403
|
+
</FilesMatch>
|
|
404
|
+
</IfModule>
|
|
405
|
+
|
|
406
|
+
### End: Cross Origin ###
|
|
407
|
+
|
|
408
|
+
### Begin: StaticFileCache (preparation) ####
|
|
409
|
+
|
|
410
|
+
# Document root configuration
|
|
411
|
+
RewriteRule .* - [E=SFC_ROOT:%{DOCUMENT_ROOT}]
|
|
412
|
+
# RewriteRule .* - [E=SFC_ROOT:%{DOCUMENT_ROOT}/t3site] # Example if your installation is installed in a directory
|
|
413
|
+
# NOTE: There are cases (apache versions and configuration) where DOCUMENT_ROOT do not exists. Please set the SFC_ROOT to the right directory without DOCUMENT_ROOT then!
|
|
414
|
+
|
|
415
|
+
# Cleanup URI
|
|
416
|
+
RewriteCond %{REQUEST_URI} ^.*$
|
|
417
|
+
RewriteRule .* - [E=SFC_URI:/%{REQUEST_URI}]
|
|
418
|
+
RewriteCond %{REQUEST_URI} ^/.*$
|
|
419
|
+
RewriteRule .* - [E=SFC_URI:%{REQUEST_URI}]
|
|
420
|
+
RewriteCond %{REQUEST_URI} ^/?$
|
|
421
|
+
RewriteRule .* - [E=SFC_URI:/]
|
|
422
|
+
|
|
423
|
+
# Cleanup HOST
|
|
424
|
+
RewriteCond %{HTTP_HOST} ^([^:]+)(:[0-9]+)?$
|
|
425
|
+
RewriteRule .* - [E=SFC_HOST:%1]
|
|
426
|
+
|
|
427
|
+
# Disable cache for EXT:solr indexing requests
|
|
428
|
+
RewriteCond %{HTTP:X-Tx-Solr-Iq} .+
|
|
429
|
+
RewriteRule .* - [E=SFC_HOST:invalid-host]
|
|
430
|
+
|
|
431
|
+
# Get scheme
|
|
432
|
+
RewriteRule .* - [E=SFC_PROTOCOL:http]
|
|
433
|
+
RewriteCond %{SERVER_PORT} ^443$ [OR]
|
|
434
|
+
RewriteCond %{HTTP:X-Forwarded-Proto} https
|
|
435
|
+
RewriteRule .* - [E=SFC_PROTOCOL:https]
|
|
436
|
+
|
|
437
|
+
# Get port
|
|
438
|
+
RewriteRule .* - [E=SFC_PORT:80]
|
|
439
|
+
RewriteCond %{ENV:SFC_PROTOCOL} ^https$ [NC]
|
|
440
|
+
RewriteRule .* - [E=SFC_PORT:443]
|
|
441
|
+
RewriteCond %{SERVER_PORT} ^[0-9]+$
|
|
442
|
+
RewriteRule .* - [E=SFC_PORT:%{SERVER_PORT}]
|
|
443
|
+
RewriteCond %{HTTP:X-Forwarded-Port} ^[0-9]+$
|
|
444
|
+
RewriteRule .* - [E=SFC_PORT:%{HTTP:X-Forwarded-Port}]
|
|
445
|
+
|
|
446
|
+
# Full path for redirect
|
|
447
|
+
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
448
|
+
|
|
449
|
+
# Extension (Order: br, gzip, default)
|
|
450
|
+
RewriteRule .* - [E=SFC_EXT:]
|
|
451
|
+
RewriteCond %{HTTP:Accept-Encoding} br [NC]
|
|
452
|
+
RewriteRule .* - [E=SFC_EXT:.br]
|
|
453
|
+
RewriteCond %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH}%{ENV:SFC_EXT} !-f
|
|
454
|
+
RewriteRule .* - [E=SFC_EXT:]
|
|
455
|
+
RewriteCond %{ENV:SFC_EXT} ^$
|
|
456
|
+
RewriteCond %{HTTP:Accept-Encoding} gzip [NC]
|
|
457
|
+
RewriteRule .* - [E=SFC_EXT:.gz]
|
|
458
|
+
RewriteCond %{ENV:SFC_EXT} ^\.gz$
|
|
459
|
+
RewriteCond %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH}%{ENV:SFC_EXT} !-f
|
|
460
|
+
RewriteRule .* - [E=SFC_EXT:]
|
|
461
|
+
|
|
462
|
+
# Write Extension to SFC_FULLPATH
|
|
463
|
+
RewriteRule .* - [E=SFC_FULLPATH:%{ENV:SFC_FULLPATH}%{ENV:SFC_EXT}]
|
|
464
|
+
|
|
465
|
+
### Begin: StaticFileCache (main) ####
|
|
466
|
+
|
|
467
|
+
# We only redirect URI's without query strings
|
|
468
|
+
RewriteCond %{QUERY_STRING} ^$
|
|
469
|
+
|
|
470
|
+
# It only makes sense to do the other checks if a static file actually exists.
|
|
471
|
+
RewriteCond %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} -f
|
|
472
|
+
|
|
473
|
+
# NO frontend or backend user is logged in. Logged in users may see different
|
|
474
|
+
# information than anonymous users. But the anonymous version is cached. So
|
|
475
|
+
# don't show the anonymous version to logged in users.
|
|
476
|
+
RewriteCond %{HTTP_COOKIE} !staticfilecache [NC]
|
|
477
|
+
|
|
478
|
+
# We only redirect GET requests
|
|
479
|
+
RewriteCond %{REQUEST_METHOD} GET
|
|
480
|
+
|
|
481
|
+
# Rewrite the request to the static file.
|
|
482
|
+
RewriteRule .* %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} [L]
|
|
483
|
+
|
|
484
|
+
# Do not allow direct call the cache entries
|
|
485
|
+
RewriteCond %{ENV:SFC_URI} ^/typo3temp/tx_staticfilecache/.*
|
|
486
|
+
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
|
487
|
+
RewriteRule .* - [F,L]
|
|
488
|
+
|
|
489
|
+
# Handle application cache
|
|
490
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
|
491
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
|
492
|
+
RewriteCond %{REQUEST_FILENAME} !-l
|
|
493
|
+
RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
494
|
+
|
|
495
|
+
### Begin: StaticFileCache (options) ####
|
|
496
|
+
|
|
497
|
+
# Set proper content type and encoding for gzipped html.
|
|
498
|
+
<FilesMatch "\.gzip$">
|
|
499
|
+
SetEnv no-gzip 1
|
|
500
|
+
SetEnv no-brotli 1
|
|
501
|
+
<IfModule mod_headers.c>
|
|
502
|
+
Header set Content-Encoding gzip
|
|
503
|
+
</IfModule>
|
|
504
|
+
</FilesMatch>
|
|
505
|
+
<FilesMatch "\.gz$">
|
|
506
|
+
SetEnv no-gzip 1
|
|
507
|
+
SetEnv no-brotli 1
|
|
508
|
+
<IfModule mod_headers.c>
|
|
509
|
+
Header set Content-Encoding gzip
|
|
510
|
+
</IfModule>
|
|
511
|
+
</FilesMatch>
|
|
512
|
+
<FilesMatch "\.br$">
|
|
513
|
+
SetEnv no-gzip 1
|
|
514
|
+
SetEnv no-brotli 1
|
|
515
|
+
<IfModule mod_headers.c>
|
|
516
|
+
Header set Content-Encoding br
|
|
517
|
+
</IfModule>
|
|
518
|
+
</FilesMatch>
|
|
519
|
+
|
|
520
|
+
# if there are same problems with ForceType, please try the AddType alternative
|
|
521
|
+
# Set proper content type gzipped html
|
|
522
|
+
<FilesMatch "\.gzip$">
|
|
523
|
+
ForceType text/html
|
|
524
|
+
# AddType "text/html" .gzip
|
|
525
|
+
</FilesMatch>
|
|
526
|
+
<FilesMatch "\.js\.gzip$">
|
|
527
|
+
ForceType text/javascript
|
|
528
|
+
# AddType "text/javascript" .gzip
|
|
529
|
+
</FilesMatch>
|
|
530
|
+
<FilesMatch "\.css\.gzip$">
|
|
531
|
+
ForceType text/css
|
|
532
|
+
# AddType "text/css" .gzip
|
|
533
|
+
</FilesMatch>
|
|
534
|
+
<FilesMatch "\.xml\.gzip$">
|
|
535
|
+
ForceType text/xml
|
|
536
|
+
# AddType "text/xml" .gzip
|
|
537
|
+
</FilesMatch>
|
|
538
|
+
<FilesMatch "\.rss\.gzip$">
|
|
539
|
+
ForceType text/xml
|
|
540
|
+
# AddType "text/xml" .gzip
|
|
541
|
+
</FilesMatch>
|
|
542
|
+
<FilesMatch "\.gz$">
|
|
543
|
+
ForceType text/html
|
|
544
|
+
# AddType "text/html" .gz
|
|
545
|
+
</FilesMatch>
|
|
546
|
+
<FilesMatch "\.xml\.gz$">
|
|
547
|
+
ForceType text/xml
|
|
548
|
+
# AddType "text/xml" .gz
|
|
549
|
+
</FilesMatch>
|
|
550
|
+
<FilesMatch "\.rss\.gz$">
|
|
551
|
+
ForceType text/xml
|
|
552
|
+
# AddType "text/xml" .gz
|
|
553
|
+
</FilesMatch>
|
|
554
|
+
<FilesMatch "\.br$">
|
|
555
|
+
ForceType text/html
|
|
556
|
+
# AddType "text/html" .br
|
|
557
|
+
</FilesMatch>
|
|
558
|
+
<FilesMatch "\.xml\.br$">
|
|
559
|
+
ForceType text/xml
|
|
560
|
+
# AddType "text/xml" .br
|
|
561
|
+
</FilesMatch>
|
|
562
|
+
<FilesMatch "\.rss\.br$">
|
|
563
|
+
ForceType text/xml
|
|
564
|
+
# AddType "text/xml" .br
|
|
565
|
+
</FilesMatch>
|
|
566
|
+
|
|
567
|
+
# Avoid .br files being delivered with Content-Language: br headers
|
|
568
|
+
<IfModule mod_mime.c>
|
|
569
|
+
RemoveLanguage .br
|
|
570
|
+
</IfModule>
|
|
571
|
+
|
|
572
|
+
### End: StaticFileCache ###
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
### Begin: Rewriting and Access ###
|
|
576
|
+
|
|
577
|
+
# You need rewriting, if you use a URL-Rewriting extension (RealURL, CoolUri).
|
|
578
|
+
|
|
579
|
+
<IfModule mod_rewrite.c>
|
|
580
|
+
|
|
581
|
+
# Enable URL rewriting
|
|
582
|
+
RewriteEngine On
|
|
583
|
+
|
|
584
|
+
# Store the current location in an environment variable CWD to use
|
|
585
|
+
# mod_rewrite in .htaccess files without knowing the RewriteBase
|
|
586
|
+
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
|
|
587
|
+
RewriteRule ^.*$ - [E=CWD:%2]
|
|
588
|
+
|
|
589
|
+
# Rules to set ApplicationContext based on hostname
|
|
590
|
+
#RewriteCond %{HTTP_HOST} ^dev\.example\.com$
|
|
591
|
+
#RewriteRule .? - [E=TYPO3_CONTEXT:Development]
|
|
592
|
+
#RewriteCond %{HTTP_HOST} ^staging\.example\.com$
|
|
593
|
+
#RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]
|
|
594
|
+
#RewriteCond %{HTTP_HOST} ^www\.example\.com$
|
|
595
|
+
#RewriteRule .? - [E=TYPO3_CONTEXT:Production]
|
|
596
|
+
|
|
597
|
+
# Rule for versioned static files, configured through:
|
|
598
|
+
# - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename']
|
|
599
|
+
# - $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename']
|
|
600
|
+
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
|
601
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
|
602
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
|
603
|
+
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ %{ENV:CWD}$1.$3 [L]
|
|
604
|
+
|
|
605
|
+
# Access block for folders
|
|
606
|
+
RewriteRule _(?:recycler|temp)_/ - [F]
|
|
607
|
+
RewriteRule fileadmin/templates/.*\.(?:txt|ts)$ - [F]
|
|
608
|
+
RewriteRule ^(?:vendor|typo3_src|typo3temp/var) - [F]
|
|
609
|
+
RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F]
|
|
610
|
+
|
|
611
|
+
# Block access to all hidden files and directories with the exception of
|
|
612
|
+
# the visible content from within the `/.well-known/` hidden directory (RFC 5785).
|
|
613
|
+
RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
|
|
614
|
+
RewriteCond %{SCRIPT_FILENAME} -d [OR]
|
|
615
|
+
RewriteCond %{SCRIPT_FILENAME} -f
|
|
616
|
+
RewriteRule (?:^|/)\. - [F]
|
|
617
|
+
|
|
618
|
+
# Stop rewrite processing, if we are in any other known directory
|
|
619
|
+
# NOTE: Add your additional local storages here
|
|
620
|
+
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|uploads/) - [L]
|
|
621
|
+
|
|
622
|
+
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the TYPO3 Backend entry point.
|
|
623
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
|
624
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
|
625
|
+
RewriteCond %{REQUEST_FILENAME} !-l
|
|
626
|
+
RewriteRule ^typo3/(.*)$ %{ENV:CWD}typo3/index.php [QSA,L]
|
|
627
|
+
|
|
628
|
+
# If the file/symlink/directory does not exist => Redirect to index.php.
|
|
629
|
+
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
|
|
630
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
|
631
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
|
632
|
+
RewriteCond %{REQUEST_FILENAME} !-l
|
|
633
|
+
RewriteRule ^.*$ %{ENV:CWD}index.php [QSA,L]
|
|
634
|
+
|
|
635
|
+
</IfModule>
|
|
636
|
+
|
|
637
|
+
# Access block for files
|
|
638
|
+
# Apache < 2.3
|
|
639
|
+
<IfModule !mod_authz_core.c>
|
|
640
|
+
<FilesMatch "(?i:^\.|^#.*#|^(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|^composer\.(?:json|lock)|^ext_conf_template\.txt|^ext_typoscript_constants\.txt|^ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
641
|
+
Order allow,deny
|
|
642
|
+
Deny from all
|
|
643
|
+
Satisfy All
|
|
644
|
+
</FilesMatch>
|
|
645
|
+
</IfModule>
|
|
646
|
+
# Apache ≥ 2.3
|
|
647
|
+
<IfModule mod_authz_core.c>
|
|
648
|
+
<If "%{REQUEST_URI} =~ m#(?i:/\.|/\x23.*\x23|/(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|/composer\.(?:json|lock)|/ext_conf_template\.txt|/ext_typoscript_constants\.txt|/ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$#">
|
|
649
|
+
Require all denied
|
|
650
|
+
</If>
|
|
651
|
+
</IfModule>
|
|
652
|
+
|
|
653
|
+
# Block access to vcs directories
|
|
654
|
+
<IfModule mod_alias.c>
|
|
655
|
+
RedirectMatch 404 /\.(?:git|svn|hg)/
|
|
656
|
+
</IfModule>
|
|
657
|
+
|
|
658
|
+
### End: Rewriting and Access ###
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
### Begin: Miscellaneous ###
|
|
663
|
+
|
|
664
|
+
# 404 error prevention for non-existing redirected folders
|
|
665
|
+
Options -MultiViews
|
|
666
|
+
|
|
667
|
+
# Make sure that directory listings are disabled.
|
|
668
|
+
<IfModule mod_autoindex.c>
|
|
669
|
+
Options -Indexes
|
|
670
|
+
</IfModule>
|
|
671
|
+
|
|
672
|
+
<IfModule mod_headers.c>
|
|
673
|
+
# Force IE to render pages in the highest available mode
|
|
674
|
+
Header set X-UA-Compatible "IE=edge"
|
|
675
|
+
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff2?|xml|xpi)$">
|
|
676
|
+
Header unset X-UA-Compatible
|
|
677
|
+
</FilesMatch>
|
|
678
|
+
|
|
679
|
+
# Reducing MIME type security risks
|
|
680
|
+
Header set X-Content-Type-Options "nosniff"
|
|
681
|
+
</IfModule>
|
|
682
|
+
|
|
683
|
+
# ETag removal
|
|
684
|
+
<IfModule mod_headers.c>
|
|
685
|
+
Header unset ETag
|
|
686
|
+
</IfModule>
|
|
687
|
+
FileETag None
|
|
688
|
+
|
|
689
|
+
### End: Miscellaneous ###
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
# Add your own rules here.
|