Important: #105244 - Updated default .htaccess template
See forge#105244
Description
When installing TYPO3 for the first time, a .htaccess file is added to
the htdocs or public directory when running TYPO3 via an Apache
web server.
In addition to several TYPO3-specific optimizations, this file mainly contains
rules (using the "mod_rewrite" Apache module) that redirect all URL requests
for non-existent files within a TYPO3 project to the main index.
entry point file.
For new installations, this file now contains updated configuration that can also be applied to existing TYPO3 setups to reflect the current default behavior.
Key changes:
- URL requests within
/_andassets/ /fileadmin/are no longer redirected, as these directories contain resources either managed by TYPO3 or by editors. - The directory
/_has been included since TYPO3 v12 in Composer-based installations and is now officially added.assets/ - The folder
/uploads/is no longer maintained by TYPO3 since v11 and is now removed from the default.htaccessconfiguration. This means that TYPO3 pages can now officially use the URL path/uploads.
It is recommended to apply these adjustments in existing TYPO3 installations as
well, even for other web servers such as nginx or IIS, provided there is no
custom usage of /_ or /uploads/ (for example through a
PSR-15 middleware, custom extension, or custom routing).
Apache example:
In Apache-based setups, look for this line:
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|uploads/) - [L]
and replace it with:
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|_assets/) - [L]