有部分用户用的是空间,有些空间里的伪静态组件版本比较高,所以就导致了伪静态规则的不兼容,以至于中文的会变成乱码,解决办法是:在RewriteRule 规则中添加 NU 即可恢复正常。
关于ISAPI_Rewrite中文变乱码解决方法如下:
1、在传输URL时,将中文进行urlencode,这样是没错的。
2、如果是ISAPI_Rewrite 3.x 只需添加 NU 参数即可。
参考代码:
Discuz伪静态中个人空间规则修改:
RewriteRule ^space-(username|uid)-(.+).html$ home.php?mod=space&$1=$2&%1 [QSA,NU,PT,L]
ShopEx伪静态中中文字符搜索问题,修改规则如下:
RewriteRule ^(.*)$ index.php?$1 [QSA,NU,PT,L]
方维购物分享系统规则后面全部添加即可,规则如下:
RewriteRule ^(.*)/index$ $1/index/.php [I,NU,L]
红色即为添加或修改部分。
下面是修改好的方维购物分享系统2.21解决伪静态乱码的规则:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/index$ $1/index/.php [I,NU,L]
RewriteRule ^(.*)/welcome$ $1/index/.php [I,NU,L]
RewriteRule ^(.*)/links$ $1/link/.php [I,NU,L]
RewriteRule ^(.*)/invite$ $1/invite/.php [I,NU,L]
#会员空间
RewriteRule ^(.*)/u/all$ $1/u/.php/?action=all [I,NU,L]
RewriteRule ^(.*)/u/message/(/d+)$ $1/u/.php/?action=message&page=$2 [I,NU,L]
RewriteRule ^(.*)/u/message$ $1/u/.php/?action=message [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/group/s(/d+)/(/d+)$ $1/u/.php/?action=group&uid=$2&sort=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/group/s(/d+)$ $1/u/.php/?action=group&uid=$2&sort=$3 [I,NU,L]
RewriteRule ^(.*)/u/([a-z]+)/([a-z]+)/(/d+)/(/d+)$ $1/u/.php/?action=$2&$3=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/u/([a-z]+)/([a-z]+)/(/d+)$ $1/u/.php/?action=$2&$3=$4 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/t(/d+)/(/d+)$ $1/u/.php/?action=$3&uid=$2&type=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/t(/d+)$ $1/u/.php/?action=$3&uid=$2&type=$4[I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/s(/d+)/(/d+)$ $1/u/.php/?action=$3&uid=$2&status=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/s(/d+)$ $1/u/.php/?action=$3&uid=$2&status=$4[I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/([a-z]+)/([a-z]+)/(/d+)$ $1/u/.php/?action=$3&uid=$2&type=$4&sort=$5&page=$6 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/([a-z]+)/([a-z]+)$ $1/u/.php/?action=$3&uid=$2&type=$4&sort=$5 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/([a-z]+)/(/d+)$ $1/u/.php/?action=$3&uid=$2&type=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/([a-z]+)$ $1/u/.php/?action=$3&uid=$2&type=$4 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)/(/d+)$ $1/u/.php/?action=$3&uid=$2&page=$4 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/([a-z]+)$ $1/u/.php/?action=$3&uid=$2 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)/(/d+)$ $1/u/.php/?action=index&uid=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/u/(/d+)$ $1/u/.php/?action=index&uid=$2 [I,NU,L]
RewriteRule ^(.*)/me$ $1/u/.php/?action=me [I,NU,L]
#小组主题模块
RewriteRule ^(.*)/group/create$ $1/group/.php/?action=create [I,NU,L]
RewriteRule ^(.*)/group/edit/(/d+)$ $1/group/.php/?action=edit&fid=$2 [I,NU,L]
RewriteRule ^(.*)/group/best/(/d+)/([a-z]+)/(/d+)$ $1/group/.php/?action=detail&type=best&fid=$2&sort=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/group/best/(/d+)/([a-z]+)$ $1/group/.php/?action=detail&type=best&fid=$2&sort=$3 [I,NU,L]
RewriteRule ^(.*)/group/best/(/d+)/(/d+)$ $1/group/.php/?action=detail&type=best&fid=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/group/best/(/d+)$ $1/group/.php/?action=detail&type=best&fid=$2 [I,NU,L]
RewriteRule ^(.*)/group/users/(/d+)/(/d+)$ $1/group/.php/?action=users&fid=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/group/users/(/d+)$ $1/group/.php/?action=users&fid=$2 [I,NU,L]
RewriteRule ^(.*)/group/users$ $1/group/.php/?action=users [I,NU,L]
RewriteRule ^(.*)/group/apply/(/d+)/(/d+)$ $1/group/.php/?action=apply&fid=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/group/apply/(/d+)$ $1/group/.php/?action=apply&fid=$2 [I,NU,L]
RewriteRule ^(.*)/group/apply$ $1/group/.php/?action=apply [I,NU,L]
RewriteRule ^(.*)/group/(/d+)/([a-z]+)/(/d+)$ $1/group/.php/?action=detail&fid=$2&sort=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/group/(/d+)/([a-z]+)$ $1/group/.php/?action=detail&fid=$2&sort=$3 [I,NU,L]
RewriteRule ^(.*)/group/(/d+)/(/d+)$ $1/group/.php/?action=detail&fid=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/group/(/d+)$ $1/group/.php/?action=detail&fid=$2 [I,NU,L]
RewriteRule ^(.*)/group$ $1/group/.php/?action=index [I,NU,L]
RewriteRule ^(.*)/topic/create/(/d+)$ $1/topic/.php/?action=create&fid=$2 [I,NU,L]
RewriteRule ^(.*)/topic/edit/(/d+)$ $1/topic/.php/?action=edit&tid=$2 [I,NU,L]
RewriteRule ^(.*)/topic/detail/(/d+)/(/d+)$ $1/topic/.php/?action=detail&tid=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/topic/detail/(/d+)$ $1/topic/.php/?action=detail&tid=$2 [I,NU,L]
#逛街页
RewriteRule ^(.*)/book/shopping/s(/d+)/([^//]+)$ $1/book/.php/?action=shopping&sid=$2&tag=$3 [I,NU,L]
RewriteRule ^(.*)/book/shopping/s(/d+)$ $1/book/.php/?action=shopping&sid=$2 [I,NU,L]
RewriteRule ^(.*)/book/shopping/(new|hot1|hot7)/([^//]+)/(/d+)$ $1/book/.php/?action=shopping&sort=$2&tag=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/book/shopping/(new|hot1|hot7)/(/d+)$ $1/book/.php/?action=shopping&sort=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/book/shopping/(new|hot1|hot7)/([^//]+)$ $1/book/.php/?action=shopping&sort=$2&tag=$3 [I,NU,L]
RewriteRule ^(.*)/book/shopping/(new|hot1|hot7)$ $1/book/.php/?action=shopping&sort=$2 [I,NU,L]
RewriteRule ^(.*)/book/shopping/([^//]+)/(/d+)$ $1/book/.php/?action=shopping&tag=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/book/shopping/(/d+)$ $1/book/.php/?action=shopping&page=$2 [I,NU,L]
RewriteRule ^(.*)/book/shopping/([^//]+)$ $1/book/.php/?action=shopping&tag=$2 [I,NU,L]
RewriteRule ^(.*)/book/shopping$ $1/book/.php/?action=shopping [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)/s(/d+)/(new|hot1|hot7)$ $1/book/.php/?action=cate&cate=$2&gid=$3&sid=$4&sort=$5 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)/s(/d+)$ $1/book/.php/?action=cate&cate=$2&gid=$3&sid=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/s(/d+)/(new|hot1|hot7)$ $1/book/.php/?action=cate&cate=$2&sid=$3&sort=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/s(/d+)$ $1/book/.php/?action=cate&cate=$2&sid=$3 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)/(new|hot1|hot7)$ $1/book/.php/?action=cate&cate=$2&gid=$3&sort=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)$ $1/book/.php/?action=cate&cate=$2&gid=$3 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)/(new|hot1|hot7)/(/d+)$ $1/book/.php/?action=cate&cate=$2&gid=$3&sort=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)/(new|hot1|hot7)$ $1/book/.php/?action=cate&cate=$2&gid=$3&sort=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)/(/d+)$ $1/book/.php/?action=cate&cate=$2&gid=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/g(/d+)$ $1/book/.php/?action=cate&cate=$2&gid=$3 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/(new|hot1|hot7)/([^//]+)/(/d+)$ $1/book/.php/?action=cate&cate=$2&sort=$3&tag=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/(new|hot1|hot7)/(/d+)$ $1/book/.php/?action=cate&cate=$2&sort=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/(new|hot1|hot7)/([^//]+)$ $1/book/.php/?action=cate&cate=$2&sort=$3&tag=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/(new|hot1|hot7)$ $1/book/.php/?action=cate&cate=$2&sort=$3 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/([^//]+)/(/d+)$ $1/book/.php/?action=cate&cate=$2&tag=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/(/d+)$ $1/book/.php/?action=cate&cate=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)/([^//]+)$ $1/book/.php/?action=cate&cate=$2&tag=$3 [I,NU,L]
RewriteRule ^(.*)/book/([a-z0-9]+)$ $1/book/.php/?action=cate&cate=$2 [I,NU,L]
#晒货
RewriteRule ^(.*)/look/goods/(new|hot1|hot7)/(/d+)$ $1/look/.php/?action=index&type=goods&sort=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/look/goods/(new|hot1|hot7)$ $1/look/.php/?action=index&type=goods&sort=$2 [I,NU,L]
RewriteRule ^(.*)/look/goods/(/d+)$ $1/look/.php/?action=index&type=goods&page=$2 [I,NU,L]
RewriteRule ^(.*)/look/goods$ $1/look/.php/?action=index&type=goods [I,NU,L]
RewriteRule ^(.*)/look/(new|hot1|hot7)/(/d+)$ $1/look/.php/?action=index&sort=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/look/(new|hot1|hot7)$ $1/look/.php/?action=index&sort=$2 [I,NU,L]
RewriteRule ^(.*)/look/(/d+)$ $1/look/.php/?action=index&page=$2 [I,NU,L]
RewriteRule ^(.*)/look$ $1/look/.php/?action=index [I,NU,L]
#搭配
RewriteRule ^(.*)/dapei/goods/(new|hot1|hot7)/(/d+)$ $1/dapei/.php/?action=index&type=goods&sort=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/dapei/goods/(new|hot1|hot7)$ $1/dapei/.php/?action=index&type=goods&sort=$2 [I,NU,L]
RewriteRule ^(.*)/dapei/goods/(/d+)$ $1/dapei/.php/?action=index&type=goods&page=$2 [I,NU,L]
RewriteRule ^(.*)/dapei/goods$ $1/dapei/.php/?action=index&type=goods [I,NU,L]
RewriteRule ^(.*)/dapei/(new|hot1|hot7)/(/d+)$ $1/dapei/.php/?action=index&sort=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/dapei/(new|hot1|hot7)$ $1/dapei/.php/?action=index&sort=$2 [I,NU,L]
RewriteRule ^(.*)/dapei/(/d+)$ $1/dapei/.php/?action=index&page=$2 [I,NU,L]
RewriteRule ^(.*)/dapei$ $1/dapei/.php/?action=index [I,NU,L]
#分享详细页
RewriteRule ^(.*)/note/(/d+)/(g|m)/(/d+)$ $1/note/.php/?action=$3&sid=$2&id=$4 [I,NU,L]
RewriteRule ^(.*)/note/(/d+)$ $1/note/.php/?action=index&sid=$2 [I,NU,L]
#勋章
RewriteRule ^(.*)/medal/u/uid/(/d+)$ $1/medal/.php/?action=u&uid=$2 [I,NU,L]
RewriteRule ^(.*)/medal/apply/mid/(/d+)$ $1/medal/.php/?action=apply&mid=$2 [I,NU,L]
RewriteRule ^(.*)/medal/index/type/(/d+)/uid/(/d+)$ $1/medal/.php/?action=index&type=$2&uid=$3 [I,NU,L]
RewriteRule ^(.*)/medal/index/type/(/d+)$ $1/medal/.php/?action=index&type=$2 [I,NU,L]
RewriteRule ^(.*)/medal/index/uid/(/d+)$ $1/medal/.php/?action=index&uid=$2 [I,NU,L]
RewriteRule ^(.*)/medal$ $1/medal/.php/?action=index [I,NU,L]
#达人
RewriteRule ^(.*)/daren/(look|dapei|group|album)/(/d+)$ $1/daren/.php/?action=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/daren/(look|dapei|group|album)$ $1/daren/.php/?action=$2 [I,NU,L]
RewriteRule ^(.*)/daren/apply$ $1/daren/.php/?action=apply [I,NU,L]
RewriteRule ^(.*)/daren$ $1/daren/.php/?action=index [I,NU,L]
#杂志社
RewriteRule ^(.*)/album/category/c(/d+)/(hot|new)/(/d+)$ $1/album/.php/?action=category&id=$2&sort=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/album/category/c(/d+)/(hot|new)$ $1/album/.php/?action=category&id=$2&sort=$3 [I,NU,L]
RewriteRule ^(.*)/album/category/c(/d+)/(/d+)$ $1/album/.php/?action=category&id=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/album/category/c(/d+)$ $1/album/.php/?action=category&id=$2 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)/s(/d+)/t(/d+)/(/d+)$ $1/album/.php/?action=show&id=$2&sid=$3&type=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)/s(/d+)/t(/d+)$ $1/album/.php/?action=show&id=$2&sid=$3&type=$4 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)/s(/d+)/(/d+)$ $1/album/.php/?action=show&id=$2&sid=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)/t(/d+)/(/d+)$ $1/album/.php/?action=show&id=$2&type=$3&page=$4 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)/s(/d+)$ $1/album/.php/?action=show&id=$2&sid=$3 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)/t(/d+)$ $1/album/.php/?action=show&id=$2&type=$3 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)/(/d+)$ $1/album/.php/?action=show&id=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/album/show/a(/d+)$ $1/album/.php/?action=show&id=$2 [I,NU,L]
RewriteRule ^(.*)/album/(hot|new)/(/d+)$ $1/album/.php/?action=index&sort=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/album/(hot|new)$ $1/album/.php/?action=index&sort=$2 [I,NU,L]
RewriteRule ^(.*)/album/(/d+)$ $1/album/.php/?action=index&page=$2 [I,NU,L]
RewriteRule ^(.*)/album/edit/(/d+)$ $1/album/.php/?action=edit&id=$2 [I,NU,L]
RewriteRule ^(.*)/album$ $1/album/.php [I,NU,L]
#好店
RewriteRule ^(.*)/shop/c(/d+)/(/d+)$ $1/shop/.php/?action=index&cid=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/shop/c(/d+)$ $1/shop/.php/?action=index&cid=$2 [I,NU,L]
RewriteRule ^(.*)/shop/(/d+)$ $1/shop/.php/?action=index&page=$2 [I,NU,L]
RewriteRule ^(.*)/shop/show/s(/d+)/(/d+)$ $1/shop/.php/?action=show&id=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/shop/show/s(/d+)$ $1/shop/.php/?action=show&id=$2 [I,NU,L]
RewriteRule ^(.*)/shop$ $1/shop/.php [I,NU,L]
#积分兑换
RewriteRule ^(.*)/exchange/info/(/d+)$ $1/exchange/.php/?action=info&id=$2 [I,NU,L]
RewriteRule ^(.*)/exchange/(/d+)$ $1/exchange/.php/?action=index&page=$2 [I,NU,L]
RewriteRule ^(.*)/exchange$ $1/exchange/.php [I,NU,L]
#话题
RewriteRule ^(.*)/event/(/d+)/(/d+)$ $1/event/.php/?action=detail&id=$2&page=$3 [I,NU,L]
RewriteRule ^(.*)/event/(/d+)$ $1/event/.php/?action=detail&id=$2 [I,NU,L]
RewriteRule ^(.*)/event/(/w+)/(/w+)$ $1/event/.php/?action=$2&type=$3 [I,NU,L]
RewriteRule ^(.*)/event/(/w+)/(/w+)/(/w+)$ $1/event/.php/?action=$2&type=$3&order=$4 [I,NU,L]
RewriteRule ^(.*)/event/(/w+)/(/w+)/(/w+)/(/d+)$ $1/event/.php/?action=$2&type=$3&order=$4&page=$5 [I,NU,L]
RewriteRule ^(.*)/event/(/w+)$ $1/event/.php/?action=$2 [I,NU,L]
RewriteRule ^(.*)/event$ $1/event/.php [I,NU,L]
#广告
RewriteRule ^(.*)/adv/(/d+)$ $1/adv/.php/?action=show&id=$2 [I,NU,L]
#其他
RewriteRule ^(.*)/([a-z]+)/([a-z]+)$ $1/$2/.php/?action=$3 [I,NU,L]