Comment 0 for bug 1394403

Revision history for this message
Matthias Ferdinand (mf+ubuntu1) wrote : apache 2.4.7 mod_dir bug PR53929

Ubuntu 14.04LTS x86_64

In apache 2.4.7 there is a bug in mod_dir, in that it does not stop when the URL has just been rewritten by mod_rewrite.

If you have rewrite rules in .htaccess, ending in a [P] for an external URL, rule execution should stop and mod_proxy should go and fetch the given URL. Instead, mod_dir fires another round of rewrite rule checks as it looks for .../index.html, possibly giving completely different results (e.g. not fetching from remote site).

http://www.apachelounge.com/Changelog-2.4.html:

  ...
  *) mod_dir: Don't search for a DirectoryIndex or DirectorySlash on a
     URL that was just rewritten by mod_rewrite. PR53929. [Eric Covener]
  ...

http://stackoverflow.com/questions/17095981/why-apache-mod-rewrite-rewrites-twice-my-url

Please backport the for PR53929
(or update apache package to 2.4.9)