diff --git a/typo3/.htaccess b/typo3/.htaccess deleted file mode 100644 index 857a9d45ca3ca7469471f30153eb0c745347b5ad..0000000000000000000000000000000000000000 --- a/typo3/.htaccess +++ /dev/null @@ -1,24 +0,0 @@ -<IfModule mod_rewrite.c> - - RewriteEngine On - # Use options from the htaccess in the main directory of the frontend in order - # to have versioned static files and TYPO3_CONTEXT working - RewriteOptions inherit - - # Store the current location in an environment variable CWD to use - # mod_rewrite in .htaccess files without knowing the RewriteBase - RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$ - RewriteRule ^.*$ - [E=CWD:%2] - - # Block non-existing .map files, which are requested by some browsers. - # We need to do that this way here, because otherwise the rewrite logic - # of the parent folder will redirect such a request to the typo3/index.php - # causing the BE (login) to be returned. - # This is due to the nature of 'RewriteOptions inherit', which copies the rules - # virtually into this file (at the end) and then the defined rules, which include - # 'typo3/' will not match in the context of this file. - RewriteRule \.map$ - [F] - - # Redirect install tool files - RewriteRule ^install(\/?.*)$ %{ENV:CWD}sysext/install/Start/Install.php [R=307,L] -</IfModule> diff --git a/typo3/install/index.php b/typo3/install/index.php new file mode 100644 index 0000000000000000000000000000000000000000..e0817d8c91fb2353c13b3ba7ed33a71b4f7e1267 --- /dev/null +++ b/typo3/install/index.php @@ -0,0 +1,17 @@ +<?php + +// This is a stub file for redirecting the user to the proper Install Tool URL + +call_user_func(function () { + + // We leverage the class loader here to get the static functionality of GeneralUtility and HttpUtility. + // This way we do not need to copy all the code here to cope with correct location header URL generation correctly + // as those two classes can already correctly deal with all known edge cases. + + require __DIR__ . '/../../vendor/autoload.php'; + + // We ensure that possible notices from Core code do not kill our redirect due to PHP output + error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED)); + + \TYPO3\CMS\Core\Utility\HttpUtility::redirect('../sysext/install/Start/Install.php', \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_307); +});