On Nov 9, 2010, at 9:06 PM, Ruiwen Chua wrote: > > Is there no way around it? Or..? > > I'd just prefer my URLs to be clean. The users dont' really need to > see all the additional information.
You might try setting error_handler instead of routes_onerror. > > //Ruiwen > > On Nov 10, 11:36 am, mdipierro <[email protected]> wrote: >> No. Why? >> >> On Nov 9, 5:16 am, Ruiwen Chua <[email protected]> wrote: >> >> >> >> >> >> >> >>> Hi all, >> >>> I'm trying to route errors like 400, 403 and 404 to nice, clear URLs >>> like '/error/', '/forbidden/' and '/whoops/'. >> >>> Unfortunately, the Web2Py Book's section on error routing >>> (http://www.web2py.com/book/default/chapter/04?search=error#Routes-on-...) >>> is pretty sparse, and I haven't been able to get this to work. >> >>> I have this section both within my application/app/routes.py (snipped >>> for brevity): >> >>> routes_in = ( >>> ('/error/', '/app/default/error/'), >>> ) >> >>> routes_onerror = [ >>> (r'app/400', r'/error/') >>> ] >> >>> However, I keep getting redirected to URLs like "error/? >>> code=400&ticket=None&requested_uri=None&request_url=/deh/index" >> >>> Is there a way I can hide the query string after the "error/"? >> >>> Cheers >>> Ruiwen

