Bug #20434
closed
Improve advanced_htaccess and make it more compatible
Added by Oliver Hader over 15 years ago.
Updated over 13 years ago.
Description
Resource files like CSS, JS, images, etc. cannot be loaded correctly due to missing configuration concerning .htaccess files. For example XAMPP comes with a default setup that does not allow to override settings in .htaccess files in the TYPO3 Core.
Any request to a file that has an expire information set by .htaccess results in a "500 Internal Server Error".
Also the texts in the advanced_htaccess file are partly outdated and need an update.
(issue imported from #M11103)
Files
Can you please post exact steps to reproduce for a xamp setup?
How can it fail with <IfModule mod_expires.c>? Or are there .htaccess somewhere, which have Expires commands not wrapped it IfModule?
I just checked all .htaccess files in the Core: There is none which uses expires commands outside of <IfModule mod_expires.c>.
I also use XAMPP and mod_expires is deactivated. I never had the problem Olly reports here.
The same was a problem if rewrite commands were not put inside <IfModule mod_rewrite.c>...</IfModule>. This was the case and has been fixed in #23799.
You could however create this kind of problem, if you activated the lines beginning with "mod_gzip_item_exclude...." which you find at the end of misc/advanced_htaccess. If you use this on Apache2.x, where mod_gzip was replaced by mod_deflate, you get a Server Error 500.
But these lines are
- deactivated by default and
- activating them on newer servers would be a configuration error.
However they are still kind of recommended as they are part of the Core.
So there are two things we should do:
- We should add a section with the lines needed for mod_deflate.
- AND put the lines on compression inside <IfModule mod_gzip.c>...</IfModule> and <IfModule mod_deflate.c>...</IfModule> respectivelly.
Christopher, could you provide a patch for this, please?
Yes, the patch is attached and pending in Core List.
Committed v3 to trunk rev. 9445.
- Target version deleted (
4.5.0)
Also available in: Atom
PDF