请教一个重写规则的问题

浏览:489 发布日期:2013/08/23 分类:求助交流
page.class.php相关的
URL_MODEL = 2(rewrite模式)
重写规则:
RewriteRule ^/?search/index/filename/([a-zA-Z0-9]+)/p/([0-9]+).shtml$ index.php?m=Search&a=index&filename=$1&p=$2&%{QUERY_STRING} [L]
搜索中使用,传了参数地址如下
/search/index/filename/2012/p/2.shtml
这个好理解 解析为:m=Search&a=index&filename=2012&p=2
然后问题出现了
当filename为数字或者英文 或者数字英文混合时 搜索正常
当filename中出现汉字或者 . 的时候就会出现404错误
正则表达式我不大会,
请教下大大们,上面的重写规则该如何写呢?
最佳答案
评论( 相关
后面还有条评论,点击查看>>