Using pattern-based routing, I get Invalid Request messages. 

Usually the routes work OK after restarting nginx. But after closing and 
restarting Chrome the problem recurs.

The failing url is www.dotzle.com/apps

This is the routes.py file.

I used the nginx setup script. The only change I made was to increase the 
upload file size to 5 meg in /etc/nginx/nginx.conf.

Later today I will try this with rocket and see if the problem goes away.

Thanks for any help.

 
BASE = ''  # optonal prefix for incoming URLs
 34 
 35 routes_in = (
 36     # do not reroute admin unless you want to disable it
 37     (BASE + '/admin', '/admin/default/index'),
 38     (BASE + '/admin/$anything', '/admin/$anything'),
 39     # do not reroute appadmin unless you want to disable it
 40     (BASE + '/$app/appadmin', '/$app/appadmin/index'),
 41     (BASE + '/$app/appadmin/$anything', '/$app/appadmin/$anything'),
 42     # do not reroute static files
 43     (BASE + '/$app/static/$anything', '/$app/static/$anything'),
 44     # reroute favicon and robots, use exable for lack of better choice
 45     ('/favicon.ico', '/examples/static/favicon.ico'),
 46     ('/robots.txt', '/examples/static/robots.txt'),
 47 
############################################################################
 48 ## This raises the invalid request message
 49 
############################################################################
 50     ('.*./apps',  '/init/default/user/login'),
 51     # remove the BASE prefix
 52     (BASE + '/$anything', '/$anything'),
 53 )
 54 
 55 # routes_out, like routes_in translates URL paths created with the 
web2py URL()
 56 # function in the same manner that route_in translates inbound URL 
paths.
 57 #
 58 
 59 routes_out = (
 60     # do not reroute admin unless you want to disable it
 61     ('/admin/$anything', BASE + '/admin/$anything'),
 62     # do not reroute appadmin unless you want to disable it
 63     ('/$app/appadmin/$anything', BASE + '/$app/appadmin/$anything'),
 64     # do not reroute static files
 65     ('/$app/static/$anything', BASE + '/$app/static/$anything'),
 66     # do other stuff
 67     ('/init/default/user/login',  '.*./apps'),
 68     # (r'.*http://otherdomain\.com.* /app/ctr(?P<any>.*)', r'\g<any>'),
 69     # (r'/app(?P<any>.*)', r'\g<any>'),
 70 
############################################################################
 71 ## Or maybe it is here
 72 
############################################################################
 73     ('/init/default/user/login', '.*./apps'),
 74     # restore the BASE prefix
 75     ('/$anything', BASE + '/$anything'),
 76 )



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to