Help: My rewriting does not work.
ohjyops
nginx-forum at nginx.us
Mon Sep 26 04:19:21 UTC 2011
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
UTF8)
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: http://forum.nginx.org/read.php?2,215776,215824#msg-215824
More information about the nginx
mailing list