I'm using mod_rewrite
to map /foo/bar/baz
to /foo/qux
using
RewriteEngine on
RewriteBase /foo/
RewriteRule ^bar/baz$ bar/baz/ [L,R=permanent]
RewriteRule ^bar/baz/(.*) qux/$1 [L]
I want to allow indexes in /foo/qux
, so I have Options +Indexes
in /foo/qux/.htaccess
.
The problem is that the index output reads "Index of /foo/qux
" even when the URL used to access it is /foo/bar/baz
. Ideally, I'd like the output to reflect the URL used (so either /foo/qux
or /foo/bar/baz
, depending). I'd settle for the output always saying "Index of /foo/bar/baz
". Is there a way to do this using mod_rewrite
or plain-vanilla Apache configuration options?