【发布时间】:2015-01-24 07:47:28
【问题描述】:
我正在使用 php 函数 urlencode http://php.net/manual/en/function.urlencode.php 来编码一个 GET 参数 $_GET['test']
我想使用 apache 重写规则将 website.com/%CE%A6 之类的 url 重写为 website.com/index.php?test=%CE%A6
RewriteRule ^([a-z0-9])/?$ /index.php?test=$1 [NC,L]
什么是可以用来代替[a-z0-9] 以接受urlencode 函数返回的有效字符范围的正则表达式?
【问题讨论】:
标签: php regex mod-rewrite