Created attachment 31387 [details] Patch File When a rewrite to proxy is configured in the server config, a check is made to make sure mod_proxy is active. But the same is not done if a rewrite to proxy is configured in an .htaccess file. This can produce a misleading error. Steps to Reproduce: 1) Disabe mod_proxy. 2) Add a RewriteRule to an .htaccess file that uses mod_proxy (i.e.): RewriteRule . http://www.mydom.com/index.html [P,L] 3) Go to a browser and try to load the site with the .htaccess file. Actual Results: The error_log will show an error like this: [Fri Mar 14 11:53:20.226288 2014] [core:error] [pid 6449] (2)No such file or directory: [client 192.168.2.4:32811] AH00132: file permissions deny server access: proxy:http://www.mydom.com/index.html Expected Results: [Fri Mar 14 12:02:05.964263 2014] [rewrite:error] [pid 6592] [client 192.168.2.4:32816] AH00669: attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://www.mydom.com/index.html I believe this same issue would be on all hardware/operating systems, but in case it matters, this was tested on: CentOS 6.5 x86_64, Apache 2.4.7, apr-1.5.0, apr-util-1.5.3. The attached patch file for the 2.4.7 version of mod_rewrite.c fixes it for me. Basically it is the block of code from hook_uri2file that does the proxy check, copied to hook_fixup.
Applied on trunk in r1838684. I've just changed the APLOGNO to avoid a duplicate. Thx for the patch.
Christophe, is this change worth a backport proposal to 2.4.x?
Yes I think so. Avoiding a misleading diagnostic is always a good thing. I don't remind clearly, but I'm 99% sure that I've tested the behavior before applying the patch. Will have to retest to be sure. But you can already propose for backport.