On 25 Dec 2012, at 7:58 AM, elyase <[email protected]> wrote: > I have two controllers 'default.py' and 'error.py'. In my website > www.cubadena.com, if I try to access www.cubadena.com/default it correctly > redirects to the index() function inside the default controller, but if I do > the same with www.cubadena.com/error/ I get a: > > Not Found > > The requested URL /error/ was not found on this server. > > Looking at the server logs I see a "Attempt to serve directory: > /var/www/error/" error. How is this possible? I have both controller files > inside the web2py controller folder, and corresponding index.html files > inside a 'default' and 'error' folders in the application views folder. > Another curious thing is that if I add the application name to the URL it > works as expected for example:www.cubadena.com/cubadena/error (works!!) > > This is how my web2py routes.py looks like: > > routers = dict( > BASE=dict(default_application='cubadena'), > cubadena=dict(languages=['en', 'es'], default_language='es'), > ) > > routes_onerror = [(r'*/*', r'/cubadena/error/index')] > > What can I do to correct this behaviour? > >
This looks more like a server configuration problem than a routing problem. For some reason your server isn't sending the /error request to web2py at all, but rather trying to serve it from the file system. --

