Home > Backend Development > PHP Tutorial > 关于urlencode与路径重写得一点小纠结,该怎么处理

关于urlencode与路径重写得一点小纠结,该怎么处理

WBOY
Release: 2016-06-13 11:49:07
Original
856 people have browsed it

关于urlencode与路径重写得一点小纠结
有个小问题 求指点

我HTACCESS文件里得规则

RewriteRule ^(.*)_(.*)/$ index.php?index_bearingP2xList_$1_$2 

对访问 NSK_618/5/ 得这样得url可以转发

但对 618/5 中间得反斜杠进行urlencode 即

NSK_618%2F5/  则匹配不到了 
报404

求指点 
------解决方案--------------------
url中如果含有中文或对含有中文的url只进行一次urlencode编码,你对反斜杠进行urlencode有什么意义。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template