You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jose Kahan <jo...@w3.org> on 2015/11/24 19:28:12 UTC

Weird interaction between mod_dir and [P] rewrites

Hi, 

This is something that has changed in 2.4 compared to 2.2.

When I follow the simple scenario (attached file) in a fresh 
install of apache, mod_dir is affecting the first value of 
DirectoryIndex to my request before it is being proxied. 

In 2.2, I was used to browse "https:/example,com/foo/" and have 
this being proxied to a backend as "https://example2.com/bar/". 
But now in 2.4.7, mod_dir is first converting "/foo/" to
"/foo/index.html" and then sending the proxy request as
"/bar/index.html".

Do you know if this is an intended feature or a bug? I would
expect the backend, and not the frontend, to decide what
it wants to add to a url ending by "/".

The code in mod_dir has changed and there's a section with a comment
saying that it steps aside when it detects it is inside a mod_rewrite
fixup. It seems to be missing a provision for proxy requests.

rbowen helped me test this against 2.4.17/fedora. I tested it against
2.4.10/debian jessie with the same result.

Thanks! Cheers.

-jose

Re: Weird interaction between mod_dir and [P] rewrites

Posted by Jose Kahan <jo...@w3.org>.
Eric,

On Tue, Nov 24, 2015 at 01:37:09PM -0500, Eric Covener wrote:
> Tried DirectoryCheckHandler? It's a 2.2-vs-2.4 difference discovered a
> little too late to change by default.

Thank you very much. That fixed my issue. I wonder if it would be
interesting to add a note about this change in behavior and
the directive in [1].

Thank you again for your promt reply.

Cheers,

-jose

[1] http://httpd.apache.org/docs/2.4/upgrading.html

Re: Weird interaction between mod_dir and [P] rewrites

Posted by Eric Covener <co...@gmail.com>.
Tried DirectoryCheckHandler? It's a 2.2-vs-2.4 difference discovered a
little too late to change by default.