Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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.