I did it:
routes_in=(
('/admin(?P<stuff>.*)', '/admin\g<stuff>'),
('/static(?P<stuff>.+)', '/cj/static\g<stuff>'),
('/(?P<controller>error|blog|auth)', '/cj/$controller/index'),
('/cj/(?P<stuff>.+)', '/cj/\g<stuff>'),
('^.*:/$', '/cj/main/index'),
('/(?P<args>.+)', '/cj/main/index/$args'),
)
routes_out=(
('/admin(?P<stuff>.*)', '/admin\g<stuff>'),
('^/cj/main/index$','/'),
('/cj/(?P<stuff>.+)', '/\g<stuff>'),
)
One other thing though, i know doing mydomain.com/google.com works but
how would I make mydomain.com/http://google.com work without getting
invaild request?
On Apr 13, 6:51 pm, ceej <[email protected]> wrote:
> so if I've defined what mydomain.com/controllers are, how would I make
> it so anything not my controller like mydomain.com/jnjNKJN would be
> picked up in my /cj/main/index as request.args[0] ?
>
> On Apr 13, 6:40 pm, mdipierro <[email protected]> wrote:
>
> > It cannot check for controller files but you can list them. replace
>
> > ('/$controller', '/cj/$controller/index'),
>
> > with
>
> > ('/(?P<controller>mycontroller1|mycontroller2|mycontroller3)', '/cj/
> > $controller/index'),
>
> > On Apr 13, 5:44 pm, ceej <[email protected]> wrote:
>
> > > If I'm doing this:
>
> > > routes_in=(
> > > ('/admin(?P<stuff>.*)', '/admin\g<stuff>'),
> > > ('/cj/(?P<stuff>.+)', '/cj/\g<stuff>'),
> > > ('/$controller', '/cj/$controller/index'),
> > > ('^.*:/$', '/cj/main/index'),
> > > ('/(?P<stuff>.+)', '/cj/\g<stuff>'),
> > > )
> > > routes_out=(
> > > ('/admin(?P<stuff>.*)', '/admin\g<stuff>'),
> > > ('^/cj/main/index$','/'),
> > > ('/cj/(?P<stuff>.+)', '/\g<stuff>'),
> > > )
>
> > > So if I goto mydomain.com/test it will look for a controller called
> > > test, is there a way to make it so that if it doesn't find the
> > > controller make cj/main/index still load as the route but have test be
> > > in request.args[0] instead of getting invalid controller?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---