#77098versionNumberInFilename = '1' not working with the demo .htaccess and Apache 2.2
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.