fixed redirect url on javascript