0
我有这样的配置在虚拟主机:国防部重写长度
RewriteEngine On
RewriteMap mapfile txt:mapfile.txt
RewriteCond ${mapfile:$1?%{QUERY_STRING}} >""
RewriteRule ^/(.+)$ ${mapfile:$1?%{QUERY_STRING}}? [R=301]
该工程确定这个mapfile.txt
prueba/code.asp?id=489 /newurl
但有了这个mapfile.txt不匹配:
prueba/code.asp?id=489/
重写日志中:
[07/Dec/2012:20:52:08 +0100] [rid#7f1ac2d4280/initial] (5) map lookup OK: map=mapfile[txt] key=prueba/code.asp?id=489 -> val=/
[07/Dec/2012:20:52:08 +0100] [rid#7f1ac2d4280/initial] (4) RewriteCond: input='/' pattern='>""' => not-matched
为什么不匹配?是否有另一种方法来测试查询长度是否大于“”
非常感谢。现在这工作完美 – Luis