2016-01-01 92 views
1

我使用XAMPP v3.2.1,並且路由對所有URL都適用,除非URL中有مم是波斯語字符)編碼URL問題

例如,此URL的routhing是404未找到:該URL的

localhost/FolderName/ClassName/MethodName/arg1/سلام%20بر 
//         if I remove this^character, everything will be fine 

輸出:

Not Found 

The requested URL /myweb/islamic_sources/quran/843/سلام بر was not found on this server. 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 

Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8 Server at localhost Port 80 

我怎樣才能解決呢?

回答

0

,如果你管通過str_replace函數像這樣

$oldurl = '...._persian_character_ ....'; 
$newurl = str_replace('_persian_character_', '', $oldurl); 
+0

值爲什麼要我刪除波斯字符會發生什麼?我需要他們......我把它作爲參數,並在查詢中使用它 – Shafizadeh

+0

也許我分心閱讀'如果我刪除這一切的作品...'你有沒有嘗試unicode? –

+0

啊,我明白你爲什麼誤解了它......但實際上我需要它,我說*「我工作的很好,如果我刪除它」*因爲我想說這個問題來自特定的角色。 – Shafizadeh