0
我試圖創建一個包裝器/處理程序,只要有人請求目錄中的任何PHP腳本,就會在Apache服務器上調用它。這樣我可以授權用戶訪問整個目錄,或者在調用目錄時編寫一些其他的東西來調用。400對Apache/PHP AddHandler包裝器的錯誤請求
這是我已經能夠拿出...
<Directory "/srv/http/INNOV/PUBLIC_HTML">
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.php
</Directory>
然後在/ SRV/HTTP/INNOV /的public_html/KB的最佳配置/我有這個.htaccess文件...
Options -Indexes
AddHandler auth_handler .php
Action auth_handler ../auth_handler.php
然後在/srv/http/INNOV/PUBLIC_HTML/kb/auth_handler.php如下:...
<?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
我檢查了我的瀏覽器,它似乎可以作出適當的請求。