PHP使用xampp找不到阿拉伯语对象中的一些网址

时间:2017-09-01 06:58:31

标签: php .htaccess url xampp arabic

我正在使用htaccess重定向,如下所示

RewriteEngine on
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]

因此,所有网址都应该重定向到index.php而且确实如此,我正在一个网站上工作,我使用url的部分作为多语言,url编码应该是,这适用于西班牙语和俄语等语言,但我在使用阿拉伯语中的某些链接时遇到问题,他们没有重定向到index.php而是在使用xampp时遇到Object not found 404错误,例如,

http://localhost/sitework4/ar/%D8%A7%D8%AA%D8%B5%D8%A7%D9%84

以上是一个包含阿拉伯语网址编码的网址,当在chrome中输入时会显示解码的阿拉伯语,它工作正常并重定向到index.php

http://localhost/sitework4/ar/%D9%85%D9%86%D8%AA%D8%AC%D8%A7%D8%AA

上面的url再次是阿拉伯语编码的,这不起作用,它不会重定向到index.php而是它给了我

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30

我不确定这是一个与xampp相关的错误或者我正在使用的URL标准出了什么问题,使用非英文字符不是问题因为俄罗斯在所有情况下都能正常工作,它可能与问题有关阿拉伯字符的RTL性质。

这里有一些例子

http://localhost/sitework4/ar/%D9%83%D8%AA%D8%A7%D9%84%D9%88%D8%AC%D8%A7%D8%AA

这是有效的

http://localhost/sitework4/ar/%D9%85%D9%86-%D9%86%D8%AD%D9%86

这不是

0 个答案:

没有答案