|
![]() | 作者: NetDemon [netdemon]
![]() |
登录 |
![]() 使用cgi-bin的网站,在今天来看,似乎已是“非主流”+“脑残”, 但“非主流”+“脑残”却也并非90后的专利,70后的Web程序设计师, 一直都在cgi-bin. 而cgi-bin通常是ScriptAlias到非DocumentRoot的子目录。 下面只是个tips: 当 =================================================== DocumentRoot /home/website/htdocs ScriptAlias /cgi-bin/ "/home/website/cgi-bin/" =================================================== 什么事情都是正常的。 但如果 ==================================================== RewriteEngine On RewriteRule ^/somepath/(\w+)/(\w+)/(\d+)\.html$ /cgi-bin/somescript.cgi?a=$1&b=$2&id=$3 [NC,L] ===================================================== 将不会正常。 apache 请求了/home/website/htdocs/cgi-bin/somescript.cgi 而这并不存在。 somescript.cgi是存在于"/home/website/cgi-bin SO! Try This: ==================================================== RewriteEngine On RewriteRule ^/somepath/(\w+)/(\w+)/(\d+)\.html$ /cgi-bin/somescript.cgi?a=$1&b=$2&id=$3 [NC,PT,L] ===================================================== Everything looks Good ! ![]() [此贴被 NetDemon(netdemon) 在 06月14日11时54分 编辑过] |
地主 发表时间: 10-06-08 08:18 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号