Arabic Characters in URL returns 404 Error

I have Arabic Characters in my URLs of my site. After setup my new VPS with LAMP and importing my local site into it, my Arabic URLs return 404 error and show me none-scene characters like below:

The requested URL /خدمات-گردشگری/ was not found on this server.

I'm double check mode_rewrite is enabled and my Charset of my SQL database is UTF-8 and tables are utf8_general_ci or utf8mb_general_ci

Thank you.

Topic characters vps server Wordpress

Category Web


I had same issue as you. I was trying to access the following URL, which results in a 404 error:

The requested URL `/abb/public/main/category/كمال` was not found on this server.

http://localhost/abb/public/main/category/كمال or http://localhost/abb/public/main/category/%D9%83%D9%85%D8%A7%D9%84

while accessing http://localhost/abb/public/main/category/فتنس http://localhost/abb/public/main/category/%D9%81%D8%AA%D9%86%D8%B3 or http://localhost/abb/public/main/category/ABCDEF works fine.

I found the cause of issue in .htaccess file. It was:

RewriteRule ^(.)$ abb/index.php?/$1 [L]

and I changed it to:

RewriteRule ^(.)$ abb/index.php?/$1 [NC,L]

and then it worked.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.