Updated redirection, referer handling