Bug #77098

versionNumberInFilename = '1' not working with the demo .htaccess and Apache 2.2

Added by Marco Huber almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-07-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

#1

Updated by Gerrit Code Review almost 5 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

#2

Updated by Gerrit Code Review almost 5 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

#3

Updated by Gerrit Code Review almost 5 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

#4

Updated by Marco Huber almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#5

Updated by Gerrit Code Review almost 5 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

#6

Updated by Marco Huber almost 5 years ago

  • Status changed from Under Review to Resolved
#7

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF