Help: My rewriting does not work

I want to rewrite an old page to a new location, I use this code:

rewrite ^/%C8%CB%CC%E5%D1%A8%CE%BB%CD%BC.html /w/新页面 permanent;

But it does not work. I still can open the old page from����Ѩλͼ.html, not being
redirected to the new location.

Can you help me correct my rewriting code? Thanks.

Posted at Nginx Forum:

you may need to using ^/人体穴位蛙.html /w/新页面 permanent;

note: You need save the file at ASCII mode for match GBK charset. But
I am not share may it work for this.

2011/9/25 ohjyops [email protected]:

Posted at Nginx Forum:
Help: My rewriting does not work.

nginx mailing list
[email protected]
nginx Info Page


Thank you for your reply.
I tried:
^/人体穴位蛙.html /w/新页面 permanent;
But it did not work. ( I did not covert the file to ASCII mode, It is

My nginx configuration file was saved in UTF8 encoding. The name of the
old page file is a unescaped form of “人体穴位图.html” in GBK
encoding. I converted my old website system from GBK encoding to a new
UTF8 encoding one, and I use a new location /w/新页面 to replace the
old “/%C8%CB%CC%E5%D1%A8%CE%BB%CD%BC.html”.

Here is the related part of my conf file:
server {

charset utf-8;
source_charset utf-8;

location ~ .html$ {
rewrite ^/%C8%CB%CC%E5%D1%A8%CE%BB%CD%BC.html /w/新页面 permanent;

What words will “/%C8%CB%CC%E5%D1%A8%CE%BB%CD%BC.html” be translated by
nginx? How can I catch the path and rewrite it to the new location?

If I covert my nginx conf file to ASCII encoding, will my new site
system (in UTF8 encoding) still work?

Posted at Nginx Forum: