Python Redirect Url Generator