开发者

htaccess and unicode (the letter 'נ')?

开发者 https://www.devze.com 2023-02-03 01:50 出处:网络
I have an htaccess file which contains some rewriting rules, for friendly urls. everything is working fine, except if I use the letter \'נ\' in hebrew.

I have an htaccess file which contains some rewriting rules, for friendly urls. everything is working fine, except if I use the letter 'נ' in hebrew.

Line (1) is working, line (2) isn't:

RewriteRule ^א$ file.ext
RewriteRule ^נ$ file.ext

I simply get a 500 开发者_如何学JAVAerror.

(I use wamp + win xp.pro)


A browser like Firefox would encode such characters, usually using UTF-8. So the web server would receive "%D7%A0" in the URL instead of this character.

Try putting that into your .htaccess rule instead of the character itself:

RewriteRule ^%D7%90$ file.ext
RewriteRule ^%D7%A0$ file.ext

It could also be that your web application doesn't know how to handle UTF-8 encoded URLs and so gives you a 500 error message.

0

精彩评论

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