使用mod_rewrite将/ cgi-bin / abc作为/ def来屏蔽
我有一个看起来很容易的任务,但不知何故,我不能得到它的工作: 我的httpd.conf中有一些有趣的行: … DocumentRoot "D:/opt/apache/htdocs" … ScriptAlias /cgi-bin/ "D:/opt/apache/cgi-bin/" … <Directory "D:/opt/apache/htdocs"> Options Indexes FollowSymLinks ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> <Directory "D:/opt/apache/cgi-bin/"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> (我知道这是愚蠢的,但它只是一个testing机器:D。) 现在,我有d:\opt\apache\cgi-bin\expired.pl ,我期望GET /licensecheck.php?code=123456 。 我希望让客户认为它使用/licensecheck.php ,但实际上通过\expired.pl返回数据。 我所尝试的是在http.conf的末尾设置以下http.conf : RewriteEngine on RewriteRule ^/licensecheck.php$ /cgi-bin/expired.pl [T=application/x-httpd-cgi,L] …但它保持404我,在我的DocumentRoot中寻找cgi-bin 目录 (不是cgi-bin \ […]