I'd like to redirect a following redirect in Nginx and I think its due to the encoding it has.
I have tried the below code and it doesn't work:
The redirect is:
From Test.com/hub/東京 To Test.com/home,
I encoded this with UTF-8 first, I also tried pasting it as is, but didn't work.
rewrite "^/hub/東京" "/home/" redirect;
rewrite "^/hub/%E6%9D%B1%E4%BA%AC%2F%20" "/home/" redirect;
Thank you in advance!
/
? That looks fine. Look at the access and error logs - the access log will have the URL-encoded form. Usenginx -T
(uppercaseT
) to view the entire configuration across all included files and ensure that your rewrite is present. Enable the rewrite_log and ensure that your error log is logging notice level reports.