for "hello" it would be
routes_in = [
('.*:https?://hello.example.com:(get|post) /', '/init/default/index/
hello'),
('.*:https?://hello.example.com:(get|post) /$f', '/init/default/$f/
hello'),
('.*:https?://hello.example.com:(get|post) /$f/$antyhing', '/init/
default/$f/hello/$anything')
...
]
you'd also need routes out and this will catch all.
routes_out =[
('/init/default/$f/$a',/$f'),
('/init/default/$f/$a/$anything',/$f/$anything'),
]
On Mar 25, 6:41 pm, Jon Romero <[email protected]> wrote:
> Thanks both of you for the reply!
>
> mdipierro, I meant something like that:
>
> *.example.com - > example.com/init/default/action/*
>
> Everytime someone types a subdomain, the name of the subdomain goes as
> an argument (request.args) into an action in to the default
> controller.
> Example:
>
> hello.example.com ->
>
> request.args(0) = hello
> controller = default
> action = action
>
> On Mar 26, 12:56 am, mdipierro <[email protected]> wrote:
>
> > I missed your email. Sorry. You can do it with routes
>
> > routes_in = [
> > ('.*:https?://hello.example.com:(get|post) /', 'example.com/init/
> > default/action/hello')
> > ('.*:https?://goodbye.example.com:(get|post) /', 'example.com/init/
> > default/action/goodbye')
> > ]
>
> > .* means from every client ip
> > https? means both http and https
> > (get|post) means get and post requests
> > / is the path you are mapping
>
> > On Mar 24, 9:19 pm, Jon Romero <[email protected]> wrote:
>
> > > Even though I've read a post here about subdomains, I can't make it
> > > work.
>
> > > what I really need is this
> > > hello.example.com -> example.com/init/default/action/hello
> > > goodbye.example.com -> example.com/init/default/action/goodbye
>
> > > it it doable?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" 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.