.htaccess的重写规则,接受特殊字符重写、特殊字符、规则、htaccess

由网友(帅到没朋友)分享简介:我的htaccess重写必须处理这些情况:My htaccess rewrite must handle these scenarios:http://example.com/words /潘塔隆http://example.com/words/pantal%C3%B3n http://example.com/w...

我的htaccess重写必须处理这些情况:

My htaccess rewrite must handle these scenarios:

http://example.com/words /潘塔隆 http://example.com/words/pantal%C3%B3n http://example.com/words /阅兵式+塞诺拉 http://example.com/words/pantalón http://example.com/words/pantal%C3%B3n http://example.com/words/señor+señora

我目前的.htaccess配置为:

My current .htaccess configuration is:

RewriteRule ^dictionary/([w+]{2,50})$ /words.php?q=$1 [QSA,L]

这是不承认的特殊字符,如:N,O

It is not recognizing the special chars, e.g.: ñ, ó.

任何想法?谢谢!

推荐答案

最终的解决方案

RewriteRule ^dictionary/([^/.]+)$ /words.php?q=$1 [QSA,L]
阅读全文

相关推荐

最新文章