Improve nginx redirection