Hi Jonathan, I'm also trying to use the new routing approach and I'm having a little trouble with static files.
In my app's static directory I have sub folders (containing files) like this: /static/css/base.css /static/images/logo.png /static/js/jquery.js I'm using the most minimal routing: routers = dict( BASE = dict( default_application = 'app', ), ) routes_onerror = [(r'*/*', r'/error')] Now when I try and request certain files I seem to get very unexpected results.... When I try: http://localhost:8000/css/base.css it works. however when I request an invalid link like: http://localhost:8000/css/base2.css It doesn't raise a 404 as I'd expect. Also for some reason I can't seem to use: http://localhost:8000/static/css/base.css (gives a 403 error and doesn't redirect to error). But I have to use 'static' for javascript files: http://localhost:8000/static/js/jquery.js As http://localhost:8000/js/jquery.js gives an error and redirects to : http://localhost:8000/error?code=400&ticket=None&requested_uri=/js/jquery.js&request_url=/js/jquery.js Any suggestions? Thanks in advance, Matt On Jan 17, 1:54 pm, Jonathan Lundell <jlund...@pobox.com> wrote: > On Jan 16, 2011, at 4:39 PM, Kenneth Lundström wrote: > > > > > > I'm not sure what's in the nightly build. The abc= line should tell us > > > something, and I can give you a little more debugging depending on what > > > it says. > > > abc gave nothing, it loaded welcome without any errors, or were should I > > see any complaints about an unknown key? > > > I´m running on linux, CentOS, MySQL, mod_wsgi, Apache. > > > I guess I have to give trunk a go, never used Mercurial so it´ll be an > > experiment. > > Yes, you should get a syntax error: > > raise SyntaxError, "unknown key '%s' in router '%s'" % (key, > app) > > In this case: "unknown key 'abc' in router 'BASE'" > > I'll download the currently nightly and take a look. > > > > > > > > > > > Kenneth > >> What's your environment? Host system, server configuration, etc? There are > >> some configurations (like mod_proxy) where you have to do domain-based > >> routing at the server rather than web2py, I think. > > >>> Kenneth > > >>>> routers = dict( > >>>> BASE = dict( > >>>> abc = None, > >>>> domains = { > >>>> 'economy.nudata.fi' : 'economy', > >>>> 'testing.nudata.fi' : 'testapplication', > >>>> } > >>>> ), > >>>> )