On Feb 15, 2011, at 9:25 PM, Andrew Evans wrote: > Hi ty for the reply and sorry about my message it was quickly done up > > I only added this line to the routes.example.py and renamed it routes.py > > routes_onerror = [('dojo0/*','/dojo/error/index')]
Did you mean 'dojo0' or 'dojo'? > > the controller error/index is this > > def index(): > if request.vars.code == '400': > return dict(redirect(URL('default', 'index'))) > elif request.vars.code == '404': > return dict(redirect(URL('default', 'index'))) > else: > return dict() You can just say: if (something): redirect(URL(...)) (no return dict) Notice that return dict() at the end assumes you have a view for dojo/error/index. > > > what I want is so if the user clicks on a link from google which no longer > exists www.namiyama.com/links.php for example it goes to default/index