400 Bad Request on Apache/PHP AddHandler wrapper -
i'm trying create wrapper/handler called on apache server whenever requests php script inside of directory. way can authorize users entire directory or write other stuff called when directory called.
this best configuration i've been able come with...
<directory "/srv/http/innov/public_html"> options -indexes allowoverride order allow,deny allow directoryindex index.php </directory>
then in /srv/http/innov/public_html/kb/ have .htaccess file...
options -indexes addhandler auth_handler .php action auth_handler ../auth_handler.php
then in /srv/http/innov/public_html/kb/auth_handler.php follows...
<?php $file = $_server['path_translated']; echo $file; ?>
access log:
- - [02/dec/2010:17:43:15 -0500] "get /kb/index.php http/1.1" 400 590
error log:
[thu dec 02 17:50:19 2010] [error] [client xxx.xxx.xxx.xxx] invalid uri in request /kb/ http/1.1
i've checked browser , seems making proper request.
nvm, had remove ../ in htaccess file. dur! apologies.
Comments
Post a Comment