httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 40373] mod_dir adds trailing slash after internal redirect by mod_rewrite to a non-folder uri
Date Sat, 13 Dec 2008 22:07:50 GMT

Bob Ionescu <> changed:

           What    |Removed                     |Added
  Attachment #18773|0                           |1
        is obsolete|                            |

--- Comment #5 from Bob Ionescu <>  2008-12-13 14:07:49 PST
(From update of attachment 18773)
Another approach: mod_dir checks, if r->finfo.filetype is set to APR_DIR. That
is true if r->filename is an existing dir, of course. If that's the case,
mod_dir checks if r->uri does not end with a trailing slash.

Now, mod_rewrite's fixup_hook modifies r->filename to sthg. redirect:/url-path
and leaves r->uri unchanged. Copying r->filename or the new URL-path for the
internal redirect to r->uri (PT-Flag, ignored in per-dir context) would not
help, because if you rewrite to /bar/index.php and copy that to r->uri, r->uri
won't end with a trailing slash, hence we would get a redirect now to
/bar/index.php/ (instead of /foo/bar/ without modifying r->uri).

Therefore I'd suggest we set r->finfo.filetype to NULL in mod_rewrite's
fixup-hook where we force r->handler to be redirect-handler. After a rewrite
with applying a substitution in per-dir context occurred, we changed
r->filename to redirect:/URL-path, which doesn't resolve to a directory anymore
at this stage of processing.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message