Thanks Victor and Yarko. It works if I specify routes_in = (('.*:/cc/$a','/ccweb/default/$a')) or routes_out = (('/ccweb/default/$a', '/cc/$a'))
If I say routes_in = (('.*:/cc/$a','/ccweb/default/$a')) routes_out = (('/ccweb/default/$a', '/cc/$a')) in routes.py, I still get the syntax error. Why am I not able to specify both? This looks like a very dumb mistake I am making. Any ideas? Prabhu On Aug 22, 9:02 am, Yarko Tymciurak <yark...@gmail.com> wrote: > you might find this discussiont helpful: > > http://groups.google.com/group/web2py/msg/abb56704cda162a0 > > On Fri, Aug 21, 2009 at 5:17 PM, Victor <victor.akuj...@gmail.com> wrote: > > > your line should be routes_in = (('.*:/testme','/myapp/default/ > > index')) dont forget to add an $ at the end if all you want is / > > testme > > > On Aug 21, 10:41 pm, Prabhu <prabhu.sen...@gmail.com> wrote: > > > Hi, > > > > Newbie to web2py here. My routes.py reads, > > > > #!/usr/bin/env python > > > # -*- coding: utf-8 -*- > > > > routes_in = (('/testme','/myapp/default/index'),) > > > > routes_out = (('/myapp/default/index', '/test'),) > > > >http://127.0.0.1:8000/testmeworks. When I upload web2py to GAE, I get > > > the following error > > > > Your routes.py has a syntax error. Please fix it before you restart > > > web2py > > > <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 3) > > > Traceback (most recent call last): > > > File "/base/data/home/apps/myapp/1.335783148456469963/ > > > gaehandler.py", line 26, in <module> > > > import gluon.main > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > main.py", line 39, in <module> > > > from globals import Request, Response, Session > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > globals.py", line 18, in <module> > > > from compileapp import run_view_in > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > compileapp.py", line 43, in <module> > > > from rewrite import error_message_custom > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > rewrite.py", line 31, in <module> > > > raise e > > > <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 3) > > > > This happens when there is a routes.py file (even if all the lines are > > > commented). > > > > Is this the correct way to do URL Rewrite? The Reddish application > > > (web2py.appspot.com) does this correctly. How? The source code (of > > > Reddish) has the application only. > > > > Can someone please clarify this? > > > > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---