Welcome! Log In Create A New Profile

Advanced

Re: Help: My rewriting does not work.

September 26, 2011 12:19AM
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?
Subject Author Posted

Help: My rewriting does not work.

ohjyops September 25, 2011 01:03AM

Re: Help: My rewriting does not work.

magicbear September 25, 2011 08:18PM

Re: Help: My rewriting does not work.

ohjyops September 26, 2011 12:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 56
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready