1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

如何使这个rewrite规则支持中文啊?

本帖由 xinli_zhao2007-10-17 发布。版面名称:源码讨论

  1. xinli_zhao

    xinli_zhao Member

    注册:
    2006-08-31
    帖子:
    201
    赞:
    1
    现在使用如下的rewrite规则,中文出现乱码,如何使其支持中文啊?如果不需要支持中文,如果将字体去掉,直接rewirte数字得了,或者在数字的前面加上个字符:

    RewriteRule ^([^/]*/)?[^/]+p[-_]?([0-9]+)\.html$ $1index.php?target=products&product_id=$2 [L]
    RewriteRule ^([^/]*/)?[^/]+c[-_]?([0-9]+)([-_]sort[-_]([a-z0-9_]+)[-_]order[-_]([a-z0-9_]+))?([-_]page-([a-z0-9_]+))?\.html$ $1index.php?target=categories&category_id=$2&sort_by=$4&sort_order=$5&page=$7 [L]
    RewriteRule ^([^/]*/)?[^/]+a[-_]?([0-9]+)\.html$ $1index.php?target=pages&page_inner_id=$2 [L]
    RewriteRule ^([^/]*/)?[^/]+t[-_]?([0-9]+)\.html$ $1index.php?target=topics&topic_id=$2 [L]
    RewriteRule ^([^/]*/)?[^/]+m[-_]?([0-9]+)\.html$ $1index.php?target=manufacturers&manufacturer_id=$2 [L]
    RewriteRule ^([^/]*/)?form[-_]?([a-z0-9_]+)[-_]?(sent)?\.html$ $1index.php?target=forms&name=$2&mode=$3 [L]
    RewriteRule ^([^/]*/)?manufacturers\.html$ $1index.php?target=manufacturers [L]
    RewriteRule ^([^/]*/)?catalog\.html$ $1index.php?mode=catalog [L]
    RewriteRule ^([^/]*/)?index\.html$ $1index.php [L]