开发者

Allowing foreign characters in .htaccess mod_rewrite

开发者 https://www.devze.com 2023-01-09 02:19 出处:网络
Is there a way to allow foreign characters in .htaccess mod_rewrite character sets? i.e., a way to ad开发者_运维问答d foreign characters like ç and others to ([A-z]+) ?I’m not quite sure with what c

Is there a way to allow foreign characters in .htaccess mod_rewrite character sets? i.e., a way to ad开发者_运维问答d foreign characters like ç and others to ([A-z]+) ?


I’m not quite sure with what character encoding Apache interprets the data in configuration files like the .htaccess file. But you can express these characters with the hexadecimal notation \xhh like:

# ç in ISO 8859-1
RewriteRule \xE7 …
# ç in UTF-8
RewriteRule \xC3\xA7 …

Now all you need to know is how these characters are encoded when requested (in general either ISO 8859-1 or UTF-8).

0

精彩评论

暂无评论...
验证码 换一张
取 消