聘我网

新概念招聘3.0

Apache重定向如何让.匹配所有字符?

vote up0vote downstar

发现网址中带有%2F等类似字符就无法匹配,apache会报404

 

1 个答复

vote up0vote downcheck

httpd.conf中需要添加一行:

AllowEncodedSlashes On

The AllowEncodedSlashes directive allows URLs which contain encoded path separators (%2F for / and additionally %5C for \ on according systems) to be used. Normally such URLs are refused with a 404 (Not found) error.

参考信息:

http://httpd.apache.org/docs/2.0/mod/core.html#allowencodedslashes

http://blog.dynom.nl/archives/Apaches-fail-with-encoded-slashes2009062540.html

链接

您的回答





不是您要找的问题? 浏览其他含有标签 的问题或者 自己问个.