validating utf-8 in htaccess rewrite rule
i validate urls with utf-8 characters with a rewrite rule
RewriteRule ^([a-z]{2})/([a-z0-9-]{1,256})/([[:print:]]{1,256})$ index.php?language=$1&categories=$2&get_query=$3 [L]
$get_query is the point, this accepts: test!?!'"<>*+ but fails for accented chars as àèéìòù, or other utf-8
for example in wiki开发者_StackOverflow中文版pedia this works great: http://en.wikipedia.org/wiki/%E6%B1%89%E8%AF%AD_%E6%BC%A2%E8%AA%9E
any help? :-)
:print:
is [\x20-\x7E]
so doesn't include non-ASCII characters. If you want to allow anything, why not just .*
, or maybe [^/]*
?
精彩评论