Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to use mod_rewrite to create clean url's that contain UTF-8 characters.

My .htaccess file looks like this:

RewriteEngine On
RewriteRule ^([a-zA-Z\-0-9]+)/?$ index.php?page=$1 [B]

It works for english characters, but when I try with utf-8 characters, I get a not found error.

How should I change my .htaccess file to get the job done?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

There is no such thing as utf-8 characters in URL on server side.

All url charcters are percent-encoded. So, add percent sign to your rewrite rule and you will be fine.

RewriteRule ^([a-zA-Z\-0-9%]+)/?$ index.php?page=$1 [B]
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.