Project

General

Profile

Actions

Bug #77098

closed

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

Added by Marco Huber almost 8 years ago. Updated over 5 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.

Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

Updated by Marco Huber over 7 years ago

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

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

Actions #6

Updated by Marco Huber over 7 years ago

  • Status changed from Under Review to Resolved
Actions #7

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF