Move URL logic into the web app.