Bug #77098
closedversionNumberInFilename = '1' not working with the demo .htaccess and Apache 2.2
100%
Description
If you use an Apache 2.2 and the demo .htaccess the RewriteRule to resolve the verionNumberInFilename doesn't work. It seems like this is a bug in Apache 2.2 and/or mod_rewrite which appends the absolute path to the file when it rewrites the path. Or perhaps I misunderstood the Apache documentation ;-). In the browser you simply get a 404 for the CSS/Javascript file.
To solve this problem, you could set a "RewriteBase = /" in your .htaccess. Then it works for every file, which is not in the "/typo3" folder. But if you enable debugging for the backend, the CSS and Javascript files from the "/typo3" folder can not be found because of the .htaccess in the "/typo3" folder. You have to set a "RewriteBase = /typo3/" in the .htaccess file in the "/typo3" folder.
Or you have to modify the .htaccess RewriteRule in the root folder from
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
to
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ %{ENV:CWD}$1.$3 [L]
This bug doesn't happen with Apache 2.4, but i find no requirement for a specific Apache version on https://github.com/TYPO3/TYPO3.CMS/blob/master/INSTALL.md.
This bug appears in TYPO3 6.2 and 7.6. And I think (but have not tested it) it appears in 8.x, too.
Updated by Gerrit Code Review over 8 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48975
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48975
Updated by Gerrit Code Review over 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49111
Updated by Marco Huber over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b34328abe4a5e54705e8ac6a94d57309eff77809.
Updated by Gerrit Code Review over 8 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49112
Updated by Marco Huber over 8 years ago
- Status changed from Under Review to Resolved
Applied in changeset 0f9b584e789c8a410539905e5e8e140c6c6b4f47.