fix bug 1082034 - fix url_redirect for '/' path

There's probably a more pythonic way to re-write this `redirect_url` logic ...