httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Färber <>
Subject ap_internal_fast_redirect / mod_dir and mod_rewrite interaction
Date Fri, 16 Jul 2010 12:39:39 GMT

I've been debugging a weird issue that came up while switching from
Apache 1.3 to Apache 2.2.15
and I need a little hint in the right direction.
The problem seems to be that mod_dir is using
ap_internal_fast_redirect and because of that
mod_rewrite doesn't work on the correct URL Path that mod_dir has set.

DirectoryIndex index.html
RewriteEngine On
RewriteRule index\.html /temp.html [R,L]

This RewriteRule never matches, I'd have to change that to
"RewriteRule ^$ /temp.html [R,L]" (which
i don't want to because i have to make sure no changes to RewriteRules
are necessary when switching
from 1.3 to 2.2).

I tried converting mod_dir.c from ap_internal_fast_redirect to just
ap_internal_redirect which solves
my problem but i'm not sure if this is the right fix? The fix also
causes mod_autoindex to complain
in the error log (Options Indexes is disabled) because the request
gets handed to the next module after

Any advice would be appreciated, is there a way i can use
ap_internal_redirect in mod_dir.c and make
sure mod_autoindex.c doesn't get run afterwards (if i redirected)?

-- Sebastian

View raw message