v13 fixes and config updates
This commit is contained in:
@@ -173,6 +173,10 @@
|
||||
|
||||
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
||||
|
||||
<FilesMatch "^index\.php$">
|
||||
ExpiresActive Off
|
||||
</FilesMatch>
|
||||
|
||||
</IfModule>
|
||||
|
||||
### End: Browser caching of resource files ###
|
||||
@@ -202,7 +206,7 @@
|
||||
AddType application/xml rdf xml
|
||||
|
||||
# JavaScript
|
||||
AddType application/javascript js
|
||||
AddType application/javascript js mjs
|
||||
|
||||
# Manifest files
|
||||
AddType application/manifest+json webmanifest
|
||||
@@ -303,7 +307,7 @@ AddDefaultCharset utf-8
|
||||
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gz)$ %{ENV:CWD}$1.$3 [L]
|
||||
RewriteRule ^(.+)\.(\d+)\.(php|js|mjs|css|png|jpg|gif|svg|avif|webp|gz)$ %{ENV:CWD}$1.$3 [L]
|
||||
|
||||
# Access block for folders
|
||||
RewriteRule _(?:recycler|temp)_/ - [F]
|
||||
@@ -318,15 +322,13 @@ AddDefaultCharset utf-8
|
||||
RewriteCond %{SCRIPT_FILENAME} -f
|
||||
RewriteRule (?:^|/)\. - [F]
|
||||
|
||||
# Stop rewrite processing, if we are in any other known directory
|
||||
# Stop rewrite processing, if we are in any known directory
|
||||
# NOTE: Add your additional local storages here
|
||||
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|uploads/) - [L]
|
||||
|
||||
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the TYPO3 Backend entry point.
|
||||
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the main TYPO3 entry point.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-l
|
||||
RewriteRule ^typo3/(.*)$ %{ENV:CWD}typo3/index.php [QSA,L]
|
||||
RewriteRule ^typo3/(.*)$ %{ENV:CWD}index.php [QSA,L]
|
||||
|
||||
# If the file/symlink/directory does not exist => Redirect to index.php.
|
||||
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
// Set up the application for the frontend
|
||||
call_user_func(static function () {
|
||||
$classLoader = require dirname(__DIR__).'/vendor/autoload.php';
|
||||
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
|
||||
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run();
|
||||
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run();
|
||||
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Core\Http\Application::class)->run();
|
||||
});
|
||||
|
||||
@@ -13,9 +13,36 @@
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
// Set up the application for the backend
|
||||
call_user_func(static function () {
|
||||
$classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php';
|
||||
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
|
||||
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
|
||||
});
|
||||
// Legacy wrapper for typo3/index.php
|
||||
// @deprecated will be removed in TYPO3 v14, /index.php entrypoint should be used directly
|
||||
|
||||
// defer deprecation log message
|
||||
$_SERVER['TYPO3_DEPRECATED_ENTRYPOINT'] = 1;
|
||||
|
||||
array_map(
|
||||
static function (string $var): void {
|
||||
$setenv = static function (string $name, ?string $value = null): void {
|
||||
// If PHP is running as an Apache module and an existing
|
||||
// Apache environment variable exists, overwrite it
|
||||
if (function_exists('apache_getenv') && function_exists('apache_setenv') && apache_getenv($name)) {
|
||||
apache_setenv($name, $value);
|
||||
}
|
||||
|
||||
if (function_exists('putenv')) {
|
||||
putenv("$name=$value");
|
||||
}
|
||||
|
||||
$_ENV[$name] = $value;
|
||||
};
|
||||
|
||||
if (isset($_SERVER[$var])) {
|
||||
$_SERVER[$var] = str_replace('/typo3/index.php', '/index.php', $_SERVER[$var]);
|
||||
}
|
||||
if (isset($_ENV[$var])) {
|
||||
$setenv($var, str_replace('/typo3/index.php', '/index.php', $_ENV[$var]));
|
||||
}
|
||||
},
|
||||
['SCRIPT_NAME', 'SCRIPT_FILENAME', 'SCRIPT_URI', 'SCRIPT_URL', 'PHP_SELF'],
|
||||
);
|
||||
|
||||
require '../index.php';
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
|
||||
call_user_func(static function () {
|
||||
$classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php';
|
||||
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL);
|
||||
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1);
|
||||
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user