mod_rewrite directory

mod_rewrite directory

am 24.12.2007 06:17:26 von James Fassett

Hi,

I am using mod_rewrite to re-direct all requests to a directory to
a .php script using a set of commands similar to:

RewriteEngine on
RewriteRule !\.(gif|jpg|png|css)$ ../some_dir/handler.php
[T=application/x-httpd-php]

These reside within a .htaccess file within public_html/visible_dir/

The result is that http://myserver/visible_dir/ is passed to
handler.php for processing and all is output as expected.

But - I am having trouble with the url http://myserver/visible_dir
(<-- no trailing slash). Apache gives me a 400 Bad Request header.
Error logs don't show anything - just a complaint that no 400.shtml
exists in the public_html directory.

I've tried multiple rewrite rules inside the .htaccess files of /
visible_dir and / -- all to no avail. Can anyone suggest or point out
my error?

Thanks,
James.