The subject is related to URL rewrite mode for Arabic encoding characters. We want to create a title rewrite for each title inserted into the database using PHP/MYSQL, in English case, every thing goes right, using the function below:
$rlink =preg_replace ('/ /i', '-', $link);
$rlink2 =preg_replace ('/[^a-z0-9\-]/i', '', $rlink);
$rlink2 =preg_replace ('/--/i', '-', $rlink2);
return $rlink2;
This function cannot be used for Arabic characters, it will eliminate all characters not into (a-z), so it cannot be used.
How proceed to used an Arabic title into the url using PHP/MYSQL like the below:
http://localhost/html/test/الصفحة-الرئيسية/
?
Thank you for your suggestions.