generator-razor 14.1.3 → 14.1.4
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
CHANGED
|
@@ -54,22 +54,22 @@ export default class extends Generator {
|
|
|
54
54
|
name: 'ComposerMode',
|
|
55
55
|
message: 'Install TYPO3 in Composer mode?',
|
|
56
56
|
choices: [{
|
|
57
|
-
name: 'No',
|
|
58
|
-
value: false
|
|
59
|
-
}, {
|
|
60
57
|
name: 'Yes',
|
|
61
58
|
value: true
|
|
59
|
+
}, {
|
|
60
|
+
name: 'No',
|
|
61
|
+
value: false
|
|
62
62
|
}],
|
|
63
63
|
default: false,
|
|
64
64
|
store: true
|
|
65
|
-
},{
|
|
65
|
+
}, {
|
|
66
66
|
type: 'input',
|
|
67
67
|
name: 'ComposerVendor',
|
|
68
68
|
message: 'Composer vendor:',
|
|
69
69
|
default: 'gg',
|
|
70
70
|
store: true,
|
|
71
71
|
when: answers => answers.ComposerMode === true
|
|
72
|
-
|
|
72
|
+
}, {
|
|
73
73
|
when: answers => !answers.ComposerMode,
|
|
74
74
|
type: 'input',
|
|
75
75
|
name: 'SrcPath',
|
|
@@ -95,11 +95,32 @@ export default class extends Generator {
|
|
|
95
95
|
default: 'root',
|
|
96
96
|
store: true
|
|
97
97
|
}, {
|
|
98
|
-
type: '
|
|
98
|
+
type: 'select',
|
|
99
99
|
name: 'DbHostname',
|
|
100
100
|
message: 'Database hostname?',
|
|
101
|
-
|
|
101
|
+
choices: [{
|
|
102
|
+
name: 'mysql',
|
|
103
|
+
value: 'mysql'
|
|
104
|
+
}, {
|
|
105
|
+
name: 'mysql8',
|
|
106
|
+
value: 'mysql8'
|
|
107
|
+
}, {
|
|
108
|
+
name: 'mariadb',
|
|
109
|
+
value: 'mariadb'
|
|
110
|
+
}, {
|
|
111
|
+
name: 'Custom',
|
|
112
|
+
value: 'custom'
|
|
113
|
+
}],
|
|
114
|
+
default: 'mariadb',
|
|
102
115
|
store: true
|
|
116
|
+
}, {
|
|
117
|
+
type: 'input',
|
|
118
|
+
name: 'DbHostnameCustom',
|
|
119
|
+
message: 'Custom database hostname?',
|
|
120
|
+
default: 'localhost',
|
|
121
|
+
store: true,
|
|
122
|
+
when: answers => answers.DbHostname === 'custom',
|
|
123
|
+
validate: value => value.trim() !== '' || 'Please enter a hostname.'
|
|
103
124
|
}, {
|
|
104
125
|
type: 'input',
|
|
105
126
|
name: 'DbPort',
|
|
@@ -218,36 +239,39 @@ export default class extends Generator {
|
|
|
218
239
|
name: 'English',
|
|
219
240
|
message: 'Activate English language in TYPO3?',
|
|
220
241
|
choices: [{
|
|
221
|
-
name: 'No',
|
|
222
|
-
value: false
|
|
223
|
-
}, {
|
|
224
242
|
name: 'Yes',
|
|
225
243
|
value: true
|
|
244
|
+
}, {
|
|
245
|
+
name: 'No',
|
|
246
|
+
value: false
|
|
226
247
|
}],
|
|
248
|
+
default: false,
|
|
227
249
|
store: true
|
|
228
250
|
}, {
|
|
229
251
|
type: 'select',
|
|
230
252
|
name: 'EnglishDefault',
|
|
231
253
|
message: 'Set English as default language?',
|
|
232
254
|
choices: [{
|
|
233
|
-
name: 'No',
|
|
234
|
-
value: false
|
|
235
|
-
}, {
|
|
236
255
|
name: 'Yes',
|
|
237
256
|
value: true
|
|
257
|
+
}, {
|
|
258
|
+
name: 'No',
|
|
259
|
+
value: false
|
|
238
260
|
}],
|
|
261
|
+
default: false,
|
|
239
262
|
store: true
|
|
240
263
|
}, {
|
|
241
264
|
type: 'select',
|
|
242
265
|
name: 'SwitchFreeMode',
|
|
243
266
|
message: 'Switch connected mode to free mode?',
|
|
244
267
|
choices: [{
|
|
245
|
-
name: 'No',
|
|
246
|
-
value: false
|
|
247
|
-
}, {
|
|
248
268
|
name: 'Yes',
|
|
249
269
|
value: true
|
|
270
|
+
}, {
|
|
271
|
+
name: 'No',
|
|
272
|
+
value: false
|
|
250
273
|
}],
|
|
274
|
+
default: false,
|
|
251
275
|
store: true
|
|
252
276
|
}, {
|
|
253
277
|
type: 'input',
|
|
@@ -272,12 +296,26 @@ export default class extends Generator {
|
|
|
272
296
|
name: 'Copyright',
|
|
273
297
|
message: 'Add copyright?',
|
|
274
298
|
choices: [{
|
|
299
|
+
name: 'Gandayo',
|
|
300
|
+
value: true
|
|
301
|
+
}, {
|
|
275
302
|
name: 'No',
|
|
276
303
|
value: false
|
|
304
|
+
}],
|
|
305
|
+
default: true,
|
|
306
|
+
store: true
|
|
307
|
+
}, {
|
|
308
|
+
type: 'select',
|
|
309
|
+
name: 'Webserver',
|
|
310
|
+
message: 'Web server?',
|
|
311
|
+
choices: [{
|
|
312
|
+
name: 'Apache',
|
|
313
|
+
value: 'apache'
|
|
277
314
|
}, {
|
|
278
|
-
name: '
|
|
279
|
-
value:
|
|
315
|
+
name: 'nginx',
|
|
316
|
+
value: 'nginx'
|
|
280
317
|
}],
|
|
318
|
+
default: 'apache',
|
|
281
319
|
store: true
|
|
282
320
|
}, {
|
|
283
321
|
type: 'select',
|
|
@@ -290,6 +328,8 @@ export default class extends Generator {
|
|
|
290
328
|
name: 'No',
|
|
291
329
|
value: false
|
|
292
330
|
}],
|
|
331
|
+
// nginx reads no .htaccess-dev
|
|
332
|
+
when: answers => answers.Webserver !== 'nginx',
|
|
293
333
|
store: true
|
|
294
334
|
}, {
|
|
295
335
|
type: 'select',
|
|
@@ -308,12 +348,13 @@ export default class extends Generator {
|
|
|
308
348
|
name: 'Search',
|
|
309
349
|
message: 'Activate search?',
|
|
310
350
|
choices: [{
|
|
311
|
-
name: 'No',
|
|
312
|
-
value: false
|
|
313
|
-
}, {
|
|
314
351
|
name: 'Yes',
|
|
315
352
|
value: true
|
|
316
|
-
}
|
|
353
|
+
}, {
|
|
354
|
+
name: 'No',
|
|
355
|
+
value: false
|
|
356
|
+
}],
|
|
357
|
+
default: false
|
|
317
358
|
}, {
|
|
318
359
|
type: 'select',
|
|
319
360
|
name: 'SSL',
|
|
@@ -344,12 +385,13 @@ export default class extends Generator {
|
|
|
344
385
|
name: 'Picture',
|
|
345
386
|
message: 'Download TYPO3 picture extension?',
|
|
346
387
|
choices: [{
|
|
347
|
-
name: 'No',
|
|
348
|
-
value: false
|
|
349
|
-
}, {
|
|
350
388
|
name: 'Yes',
|
|
351
389
|
value: true
|
|
352
|
-
}
|
|
390
|
+
}, {
|
|
391
|
+
name: 'No',
|
|
392
|
+
value: false
|
|
393
|
+
}],
|
|
394
|
+
default: false
|
|
353
395
|
}]
|
|
354
396
|
|
|
355
397
|
this.props = await this.prompt(prompts)
|
|
@@ -363,6 +405,10 @@ export default class extends Generator {
|
|
|
363
405
|
|
|
364
406
|
this._globalConfig.set('promptValues', promptValues)
|
|
365
407
|
|
|
408
|
+
if (this.props.DbHostname === 'custom') {
|
|
409
|
+
this.props.DbHostname = this.props.DbHostnameCustom.trim()
|
|
410
|
+
}
|
|
411
|
+
|
|
366
412
|
await this.fs.commit()
|
|
367
413
|
}
|
|
368
414
|
|
|
@@ -1452,7 +1498,8 @@ export default class extends Generator {
|
|
|
1452
1498
|
copyright: this.props.Copyright,
|
|
1453
1499
|
fontawesome: this.props.FontAwesome,
|
|
1454
1500
|
cols: this.props.Cols,
|
|
1455
|
-
htaccess: this.props.Htaccess,
|
|
1501
|
+
htaccess: this.props.Webserver !== 'nginx' && this.props.Htaccess === true,
|
|
1502
|
+
webserver: this.props.Webserver ?? 'apache',
|
|
1456
1503
|
smtpTransport: this.props.Transport ?? '',
|
|
1457
1504
|
smtpEncrypt: this.props.Encrypt === true ? 1 : 0,
|
|
1458
1505
|
smtpServer: this.props.SmtpServer ?? '',
|
|
@@ -1475,14 +1522,14 @@ export default class extends Generator {
|
|
|
1475
1522
|
|
|
1476
1523
|
const targetHtaccess = this.props.ComposerMode
|
|
1477
1524
|
? this.destinationPath(
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1525
|
+
'public',
|
|
1526
|
+
'.htaccess-dev'
|
|
1527
|
+
)
|
|
1481
1528
|
: this.destinationPath(
|
|
1482
|
-
|
|
1483
|
-
|
|
1529
|
+
'.htaccess-dev'
|
|
1530
|
+
)
|
|
1484
1531
|
|
|
1485
|
-
if (!
|
|
1532
|
+
if (!config.htaccess) {
|
|
1486
1533
|
await fs.remove(plainHtaccess)
|
|
1487
1534
|
await fs.remove(sslHtaccess)
|
|
1488
1535
|
await fs.remove(targetHtaccess)
|
|
@@ -49,6 +49,23 @@ RewriteCond %{HTTP_USER_AGENT} "AppleWebKit.*Version\/[1-8]\.[0-9\.]*\ Mobile\/[
|
|
|
49
49
|
RewriteCond %{HTTP_USER_AGENT} (MSIE|Trident) [NC]
|
|
50
50
|
RewriteRule .* browser-support.html [L]
|
|
51
51
|
|
|
52
|
+
# ------------------------------------------------------------------------------
|
|
53
|
+
# | build & deploy |
|
|
54
|
+
# ------------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
<IfModule mod_authz_core.c>
|
|
57
|
+
<FilesMatch "^(vite\.config\.mjs|razor\.mjs|stylelint\.config\.mjs|postcss\.config\.mjs|deploy\.php)$">
|
|
58
|
+
Require all denied
|
|
59
|
+
</FilesMatch>
|
|
60
|
+
</IfModule>
|
|
61
|
+
|
|
62
|
+
<IfModule mod_rewrite.c>
|
|
63
|
+
RewriteEngine On
|
|
64
|
+
|
|
65
|
+
RewriteRule ^build(?:/|$) - [F,L,NC]
|
|
66
|
+
RewriteRule ^deploy(?:/|$) - [F,L,NC]
|
|
67
|
+
</IfModule>
|
|
68
|
+
|
|
52
69
|
# ----------------------------------------------------------------------
|
|
53
70
|
# | Keep alive |
|
|
54
71
|
# ----------------------------------------------------------------------
|
|
@@ -117,12 +134,12 @@ RewriteRule .* browser-support.html [L]
|
|
|
117
134
|
# Redirect from the `http://` to the `https://` version of the URL.
|
|
118
135
|
# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
|
|
119
136
|
|
|
120
|
-
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
|
|
137
|
+
# <IfModule mod_rewrite.c>
|
|
138
|
+
# RewriteEngine On
|
|
139
|
+
# RewriteCond %{HTTPS} !=on
|
|
140
|
+
# RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
|
|
141
|
+
# RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
|
142
|
+
# </IfModule>
|
|
126
143
|
|
|
127
144
|
# ----------------------------------------------------------------------
|
|
128
145
|
# | TYPO3 |
|
|
@@ -297,6 +314,10 @@ AddType "text/css" .css.gz
|
|
|
297
314
|
|
|
298
315
|
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
|
299
316
|
|
|
317
|
+
<FilesMatch "^index\.php$">
|
|
318
|
+
ExpiresActive Off
|
|
319
|
+
</FilesMatch>
|
|
320
|
+
|
|
300
321
|
</IfModule>
|
|
301
322
|
|
|
302
323
|
### End: Browser caching of resource files ###
|
|
@@ -438,7 +459,7 @@ RewriteCond %{HTTP:X-Forwarded-Port} ^[0-9]+$
|
|
|
438
459
|
RewriteRule .* - [E=SFC_PORT:%{HTTP:X-Forwarded-Port}]
|
|
439
460
|
|
|
440
461
|
# Full path for redirect
|
|
441
|
-
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
462
|
+
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/assets/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
442
463
|
|
|
443
464
|
# Extension (Order: br, gzip, default)
|
|
444
465
|
RewriteRule .* - [E=SFC_EXT:]
|
|
@@ -476,7 +497,7 @@ RewriteCond %{REQUEST_METHOD} GET
|
|
|
476
497
|
RewriteRule .* %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} [L]
|
|
477
498
|
|
|
478
499
|
# Do not allow direct call the cache entries
|
|
479
|
-
RewriteCond %{ENV:SFC_URI} ^/typo3temp/tx_staticfilecache/.*
|
|
500
|
+
RewriteCond %{ENV:SFC_URI} ^/typo3temp/assets/tx_staticfilecache/.*
|
|
480
501
|
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
|
481
502
|
RewriteRule .* - [F,L]
|
|
482
503
|
|
|
@@ -602,7 +623,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
602
623
|
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
|
603
624
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
604
625
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
605
|
-
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz)$ %{ENV:CWD}$1.$3 [L]
|
|
626
|
+
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz|xsl|ico)$ %{ENV:CWD}$1.$3 [L]
|
|
606
627
|
|
|
607
628
|
# Access block for folders
|
|
608
629
|
RewriteRule _(?:recycler|temp)_/ - [F]
|
|
@@ -619,7 +640,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
619
640
|
|
|
620
641
|
# Stop rewrite processing, if we are in any known directory
|
|
621
642
|
# NOTE: Add your additional local storages here
|
|
622
|
-
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/) - [L]
|
|
643
|
+
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/|_assets_install/) - [L]
|
|
623
644
|
|
|
624
645
|
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the main TYPO3 entry point.
|
|
625
646
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
@@ -637,7 +658,8 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
637
658
|
# Access block for files
|
|
638
659
|
# Apache < 2.3
|
|
639
660
|
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
661
|
+
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
662
|
+
Order allow,deny
|
|
641
663
|
Deny from all
|
|
642
664
|
Satisfy All
|
|
643
665
|
</FilesMatch>
|
|
@@ -49,6 +49,23 @@ RewriteCond %{HTTP_USER_AGENT} "AppleWebKit.*Version\/[1-8]\.[0-9\.]*\ Mobile\/[
|
|
|
49
49
|
RewriteCond %{HTTP_USER_AGENT} (MSIE|Trident) [NC]
|
|
50
50
|
RewriteRule .* browser-support.html [L]
|
|
51
51
|
|
|
52
|
+
# ------------------------------------------------------------------------------
|
|
53
|
+
# | build & deploy |
|
|
54
|
+
# ------------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
<IfModule mod_authz_core.c>
|
|
57
|
+
<FilesMatch "^(vite\.config\.mjs|razor\.mjs|stylelint\.config\.mjs|postcss\.config\.mjs|deploy\.php)$">
|
|
58
|
+
Require all denied
|
|
59
|
+
</FilesMatch>
|
|
60
|
+
</IfModule>
|
|
61
|
+
|
|
62
|
+
<IfModule mod_rewrite.c>
|
|
63
|
+
RewriteEngine On
|
|
64
|
+
|
|
65
|
+
RewriteRule ^build(?:/|$) - [F,L,NC]
|
|
66
|
+
RewriteRule ^deploy(?:/|$) - [F,L,NC]
|
|
67
|
+
</IfModule>
|
|
68
|
+
|
|
52
69
|
# ----------------------------------------------------------------------
|
|
53
70
|
# | Keep alive |
|
|
54
71
|
# ----------------------------------------------------------------------
|
|
@@ -297,6 +314,10 @@ AddType "text/css" .css.gz
|
|
|
297
314
|
|
|
298
315
|
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
|
299
316
|
|
|
317
|
+
<FilesMatch "^index\.php$">
|
|
318
|
+
ExpiresActive Off
|
|
319
|
+
</FilesMatch>
|
|
320
|
+
|
|
300
321
|
</IfModule>
|
|
301
322
|
|
|
302
323
|
### End: Browser caching of resource files ###
|
|
@@ -438,7 +459,7 @@ RewriteCond %{HTTP:X-Forwarded-Port} ^[0-9]+$
|
|
|
438
459
|
RewriteRule .* - [E=SFC_PORT:%{HTTP:X-Forwarded-Port}]
|
|
439
460
|
|
|
440
461
|
# Full path for redirect
|
|
441
|
-
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
462
|
+
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/assets/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
442
463
|
|
|
443
464
|
# Extension (Order: br, gzip, default)
|
|
444
465
|
RewriteRule .* - [E=SFC_EXT:]
|
|
@@ -476,7 +497,7 @@ RewriteCond %{REQUEST_METHOD} GET
|
|
|
476
497
|
RewriteRule .* %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} [L]
|
|
477
498
|
|
|
478
499
|
# Do not allow direct call the cache entries
|
|
479
|
-
RewriteCond %{ENV:SFC_URI} ^/typo3temp/tx_staticfilecache/.*
|
|
500
|
+
RewriteCond %{ENV:SFC_URI} ^/typo3temp/assets/tx_staticfilecache/.*
|
|
480
501
|
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
|
481
502
|
RewriteRule .* - [F,L]
|
|
482
503
|
|
|
@@ -602,7 +623,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
602
623
|
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
|
603
624
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
604
625
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
605
|
-
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz)$ %{ENV:CWD}$1.$3 [L]
|
|
626
|
+
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz|xsl|ico)$ %{ENV:CWD}$1.$3 [L]
|
|
606
627
|
|
|
607
628
|
# Access block for folders
|
|
608
629
|
RewriteRule _(?:recycler|temp)_/ - [F]
|
|
@@ -619,7 +640,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
619
640
|
|
|
620
641
|
# Stop rewrite processing, if we are in any known directory
|
|
621
642
|
# NOTE: Add your additional local storages here
|
|
622
|
-
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/) - [L]
|
|
643
|
+
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/|_assets_install/) - [L]
|
|
623
644
|
|
|
624
645
|
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the main TYPO3 entry point.
|
|
625
646
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
@@ -637,7 +658,8 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
637
658
|
# Access block for files
|
|
638
659
|
# Apache < 2.3
|
|
639
660
|
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
661
|
+
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
662
|
+
Order allow,deny
|
|
641
663
|
Deny from all
|
|
642
664
|
Satisfy All
|
|
643
665
|
</FilesMatch>
|
|
@@ -49,6 +49,23 @@ RewriteCond %{HTTP_USER_AGENT} "AppleWebKit.*Version\/[1-8]\.[0-9\.]*\ Mobile\/[
|
|
|
49
49
|
RewriteCond %{HTTP_USER_AGENT} (MSIE|Trident) [NC]
|
|
50
50
|
RewriteRule .* browser-support.html [L]
|
|
51
51
|
|
|
52
|
+
# ------------------------------------------------------------------------------
|
|
53
|
+
# | build & deploy |
|
|
54
|
+
# ------------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
<IfModule mod_authz_core.c>
|
|
57
|
+
<FilesMatch "^(vite\.config\.mjs|razor\.mjs|stylelint\.config\.mjs|postcss\.config\.mjs|deploy\.php)$">
|
|
58
|
+
Require all denied
|
|
59
|
+
</FilesMatch>
|
|
60
|
+
</IfModule>
|
|
61
|
+
|
|
62
|
+
<IfModule mod_rewrite.c>
|
|
63
|
+
RewriteEngine On
|
|
64
|
+
|
|
65
|
+
RewriteRule ^build(?:/|$) - [F,L,NC]
|
|
66
|
+
RewriteRule ^deploy(?:/|$) - [F,L,NC]
|
|
67
|
+
</IfModule>
|
|
68
|
+
|
|
52
69
|
# ----------------------------------------------------------------------
|
|
53
70
|
# | Keep alive |
|
|
54
71
|
# ----------------------------------------------------------------------
|
|
@@ -117,12 +134,12 @@ RewriteRule .* browser-support.html [L]
|
|
|
117
134
|
# Redirect from the `http://` to the `https://` version of the URL.
|
|
118
135
|
# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
|
|
119
136
|
|
|
120
|
-
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
|
|
137
|
+
# <IfModule mod_rewrite.c>
|
|
138
|
+
# RewriteEngine On
|
|
139
|
+
# RewriteCond %{HTTPS} !=on
|
|
140
|
+
# RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
|
|
141
|
+
# RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
|
142
|
+
# </IfModule>
|
|
126
143
|
|
|
127
144
|
# ----------------------------------------------------------------------
|
|
128
145
|
# | TYPO3 |
|
|
@@ -297,6 +314,10 @@ AddType "text/css" .css.gz
|
|
|
297
314
|
|
|
298
315
|
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
|
299
316
|
|
|
317
|
+
<FilesMatch "^index\.php$">
|
|
318
|
+
ExpiresActive Off
|
|
319
|
+
</FilesMatch>
|
|
320
|
+
|
|
300
321
|
</IfModule>
|
|
301
322
|
|
|
302
323
|
### End: Browser caching of resource files ###
|
|
@@ -438,7 +459,7 @@ RewriteCond %{HTTP:X-Forwarded-Port} ^[0-9]+$
|
|
|
438
459
|
RewriteRule .* - [E=SFC_PORT:%{HTTP:X-Forwarded-Port}]
|
|
439
460
|
|
|
440
461
|
# Full path for redirect
|
|
441
|
-
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
462
|
+
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/assets/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
442
463
|
|
|
443
464
|
# Extension (Order: br, gzip, default)
|
|
444
465
|
RewriteRule .* - [E=SFC_EXT:]
|
|
@@ -476,7 +497,7 @@ RewriteCond %{REQUEST_METHOD} GET
|
|
|
476
497
|
RewriteRule .* %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} [L]
|
|
477
498
|
|
|
478
499
|
# Do not allow direct call the cache entries
|
|
479
|
-
RewriteCond %{ENV:SFC_URI} ^/typo3temp/tx_staticfilecache/.*
|
|
500
|
+
RewriteCond %{ENV:SFC_URI} ^/typo3temp/assets/tx_staticfilecache/.*
|
|
480
501
|
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
|
481
502
|
RewriteRule .* - [F,L]
|
|
482
503
|
|
|
@@ -602,7 +623,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
602
623
|
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
|
603
624
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
604
625
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
605
|
-
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz)$ %{ENV:CWD}$1.$3 [L]
|
|
626
|
+
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz|xsl|ico)$ %{ENV:CWD}$1.$3 [L]
|
|
606
627
|
|
|
607
628
|
# Access block for folders
|
|
608
629
|
RewriteRule _(?:recycler|temp)_/ - [F]
|
|
@@ -619,7 +640,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
619
640
|
|
|
620
641
|
# Stop rewrite processing, if we are in any known directory
|
|
621
642
|
# NOTE: Add your additional local storages here
|
|
622
|
-
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/) - [L]
|
|
643
|
+
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/|_assets_install/) - [L]
|
|
623
644
|
|
|
624
645
|
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the main TYPO3 entry point.
|
|
625
646
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
@@ -637,7 +658,8 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
637
658
|
# Access block for files
|
|
638
659
|
# Apache < 2.3
|
|
639
660
|
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
661
|
+
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
662
|
+
Order allow,deny
|
|
641
663
|
Deny from all
|
|
642
664
|
Satisfy All
|
|
643
665
|
</FilesMatch>
|
|
@@ -49,6 +49,23 @@ RewriteCond %{HTTP_USER_AGENT} "AppleWebKit.*Version\/[1-8]\.[0-9\.]*\ Mobile\/[
|
|
|
49
49
|
RewriteCond %{HTTP_USER_AGENT} (MSIE|Trident) [NC]
|
|
50
50
|
RewriteRule .* browser-support.html [L]
|
|
51
51
|
|
|
52
|
+
# ------------------------------------------------------------------------------
|
|
53
|
+
# | build & deploy |
|
|
54
|
+
# ------------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
<IfModule mod_authz_core.c>
|
|
57
|
+
<FilesMatch "^(vite\.config\.mjs|razor\.mjs|stylelint\.config\.mjs|postcss\.config\.mjs|deploy\.php)$">
|
|
58
|
+
Require all denied
|
|
59
|
+
</FilesMatch>
|
|
60
|
+
</IfModule>
|
|
61
|
+
|
|
62
|
+
<IfModule mod_rewrite.c>
|
|
63
|
+
RewriteEngine On
|
|
64
|
+
|
|
65
|
+
RewriteRule ^build(?:/|$) - [F,L,NC]
|
|
66
|
+
RewriteRule ^deploy(?:/|$) - [F,L,NC]
|
|
67
|
+
</IfModule>
|
|
68
|
+
|
|
52
69
|
# ----------------------------------------------------------------------
|
|
53
70
|
# | Keep alive |
|
|
54
71
|
# ----------------------------------------------------------------------
|
|
@@ -297,6 +314,10 @@ AddType "text/css" .css.gz
|
|
|
297
314
|
|
|
298
315
|
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
|
299
316
|
|
|
317
|
+
<FilesMatch "^index\.php$">
|
|
318
|
+
ExpiresActive Off
|
|
319
|
+
</FilesMatch>
|
|
320
|
+
|
|
300
321
|
</IfModule>
|
|
301
322
|
|
|
302
323
|
### End: Browser caching of resource files ###
|
|
@@ -438,7 +459,7 @@ RewriteCond %{HTTP:X-Forwarded-Port} ^[0-9]+$
|
|
|
438
459
|
RewriteRule .* - [E=SFC_PORT:%{HTTP:X-Forwarded-Port}]
|
|
439
460
|
|
|
440
461
|
# Full path for redirect
|
|
441
|
-
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
462
|
+
RewriteRule .* - [E=SFC_FULLPATH:typo3temp/assets/tx_staticfilecache/%{ENV:SFC_PROTOCOL}_%{ENV:SFC_HOST}_%{ENV:SFC_PORT}%{ENV:SFC_URI}/index]
|
|
442
463
|
|
|
443
464
|
# Extension (Order: br, gzip, default)
|
|
444
465
|
RewriteRule .* - [E=SFC_EXT:]
|
|
@@ -476,7 +497,7 @@ RewriteCond %{REQUEST_METHOD} GET
|
|
|
476
497
|
RewriteRule .* %{ENV:SFC_ROOT}/%{ENV:SFC_FULLPATH} [L]
|
|
477
498
|
|
|
478
499
|
# Do not allow direct call the cache entries
|
|
479
|
-
RewriteCond %{ENV:SFC_URI} ^/typo3temp/tx_staticfilecache/.*
|
|
500
|
+
RewriteCond %{ENV:SFC_URI} ^/typo3temp/assets/tx_staticfilecache/.*
|
|
480
501
|
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
|
481
502
|
RewriteRule .* - [F,L]
|
|
482
503
|
|
|
@@ -602,7 +623,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
602
623
|
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
|
603
624
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
604
625
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
605
|
-
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz)$ %{ENV:CWD}$1.$3 [L]
|
|
626
|
+
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz|xsl|ico)$ %{ENV:CWD}$1.$3 [L]
|
|
606
627
|
|
|
607
628
|
# Access block for folders
|
|
608
629
|
RewriteRule _(?:recycler|temp)_/ - [F]
|
|
@@ -619,7 +640,7 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
619
640
|
|
|
620
641
|
# Stop rewrite processing, if we are in any known directory
|
|
621
642
|
# NOTE: Add your additional local storages here
|
|
622
|
-
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/) - [L]
|
|
643
|
+
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/|_assets_install/) - [L]
|
|
623
644
|
|
|
624
645
|
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the main TYPO3 entry point.
|
|
625
646
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
@@ -637,7 +658,8 @@ RewriteRule ^.*\.sfc$ %{ENV:CWD}index.php?eID=sfc_manifest [QSA,L]
|
|
|
637
658
|
# Access block for files
|
|
638
659
|
# Apache < 2.3
|
|
639
660
|
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
661
|
+
<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|neon|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
|
662
|
+
Order allow,deny
|
|
641
663
|
Deny from all
|
|
642
664
|
Satisfy All
|
|
643
665
|
</FilesMatch>
|