Forum: Ruby on Rails Routing problem: extending matched route segment

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3504745159d79c585e4f7df8df76aa10?d=identicon&s=25 Ingo Weiss (ingoweiss)
on 2007-07-25 11:47
(Received via mailing list)
Hi all,

I would like to route a request to a specific domain
('request_routing' plugin installed) to controllers living in a
subfolder for that domain like this:
:controller => 'mydomain/home', :action => 'index'

I would like to use a general route like '/:controller/:action'

Is it possible to somehow access the string matched by :controller,
extend it and use the extended string as the controller, like the

# mydomain routes
map.with_options :requirements => { :domain => /^mydomain/ } do |
    mydomain.connect ':controller/:action', :controller => "mydomain/

Thanks for any hint!
This topic is locked and can not be replied to.