Apache Server configuration support - mod_rewrite directory

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > December 2007 > mod_rewrite directory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author mod_rewrite directory
James Fassett

2007-12-24, 1:44 am

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.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com