I am trying to produce a wrapper/handler that'll be known as around the Apache server whenever someone demands any PHP script within a directory. This way I'm able to authorize customers for the whole directory or write another stuff to become known as once the directory is known as.
This is actually the best configuration I have had the opportunity to develop...
<Directory "/srv/http/INNOV/PUBLIC_HTML"> Options -Indexes AllowOverride All Order allow,deny Allow from all DirectoryIndex index.php </Directory>
Then in /srv/http/INNOV/PUBLIC_HTML/kb/ I've this .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 is the following...
<?php $FILE = $_SERVER['PATH_TRANSLATED']; echo $FILE; ?>
- - [02/Dec/2010:17:43:15 -0500] "GET /kb/index.php HTTP/1.1" 400 590
[Thu Dec 02 17:50:19 2010] [error] [client XXX.XXX.XXX.XXX] Invalid URI in request GET /kb/ HTTP/1.1
I have checked my browser also it appears to become creating a proper request.
nvm, all I needed to do was take away the ../ within the htaccess file. DUR! Apologies.