def index(self, tag):
    redirect_url = db.urls[tag]
ip = cherrypy.request.headers['Remote-Addr']
request_url = 'http://ipinfo.io/{0}/country'.format(ip)
r = requests.get(request_url)
country = r.text.strip()
raise cherrypy.HTTPRedirect(redirect_url)

@cherrypy.expose
def default(self, tag):
    return self.index(tag)
Default the root view in cherrypy