Handling redirects and only routing once per request