Bug #20434

Improve advanced_htaccess and make it more compatible

Added by Oliver Hader about 11 years ago. Updated about 9 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


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)

11103 Improve advanced_htaccess.patch View (7.93 KB) Administrator Admin, 2010-11-08 21:06

Related issues

Related to TYPO3 Core - Bug #22917: gzipped files cannot be loaded in the backend Closed 2010-06-17
Related to TYPO3 Core - Bug #23799: Add IfModule mod_rewrite.c to misc/advanced.htaccess Closed 2010-10-20
Related to TYPO3 Core - Bug #24639: Add Expires header to .htaccess Closed 2011-01-18
Duplicated by TYPO3 Core - Bug #23880: Nobrainer: Fix outdated wording in misc/advanced.htaccess Closed 2010-10-30


#1 Updated by Michiel Roos almost 10 years ago

Can you please post exact steps to reproduce for a xamp setup?

#2 Updated by Steffen Gebert almost 10 years ago

How can it fail with <IfModule mod_expires.c>? Or are there .htaccess somewhere, which have Expires commands not wrapped it IfModule?

#3 Updated by Chris topher over 9 years ago

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.

#4 Updated by Chris topher over 9 years ago

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.

#5 Updated by Steffen Gebert over 9 years ago

Christopher, could you provide a patch for this, please?

#6 Updated by Chris topher over 9 years ago

Yes, the patch is attached and pending in Core List.

#7 Updated by Ernesto Baschny over 9 years ago

Committed v3 to trunk rev. 9445.

#8 Updated by Susanne Moog about 9 years ago

  • Target version deleted (4.5.0)

Also available in: Atom PDF