Route all requests to one action

Is there a simple way of directing all requests to a particular
controller to resolve to a single action?
I was thinking that this might be a useful way to redirect to a “site
down for maintenance” page rather than using apache’s mod_rewrite.

see api docs for “Route Globbing”:
http://api.rubyonrails.org/classes/ActionController/Routing.html

e.g., make a ‘default’ controller, and in your routes.rb, make this
the last route:

send everything to ‘default’ controller

map.connect ‘*path’,
:controller => ‘default’,
:action => ‘index’

On May 29, 6:17 am, Milo T. [email protected]

Jeff Emminger wrote:

see api docs for “Route Globbing”:
http://api.rubyonrails.org/classes/ActionController/Routing.html

Great, thanks.
Adding that first in routes.rb does exactly what I need and has the
advantage of working without apache.