Have a look at this article:
http://www.taylorluk.com/2009/08/hey-pac-man-sup-subdomains
On Jun 24, 8:28 pm, Piotr Sarnacki
<dro...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I needed to handle custom account subdomains with Rails and I wrote a
> simple rack middleware for thathttp://github.com/drogus/rack-subdomain.
> It works by mapping any subdomain to given PATH. For example when user
> hits drogus.example.org/account and mapping is /users/:subdomain, it
> will map the request to example.org/users/drogus/account
>
> I accomplished it with rack middleware, cause I wanted to have this
> mechanism also for Rails 2.x.
>
> The thing is, I don''t want to duplicate stuff that''s
already in
> router, so here is my question: is there any way to do such mapping
> with Rails 3 router? Or maybe a better way to handle custom account
> subdomains?
>
> Cheers,
>
> Peter
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.