I would like to set the routings as follows
/url/http://google.com
to urls
controller and index
action.W
get ':klass/:id', constraints: { klass: /\D*/ }
Or you can use Route Globbing:
match "urls/*url" => "urls#index"
You can access the values in your controller via
params[:url]
Reference: http://guides.rubyonrails.org/routing.html Search for "Route Globbing"
You could do something similar to
match "urls/:url" => "urls#index", :constraints => {:url => /.*/}
in Rails 2.3 which may work in Rails 3 to allow you to match the / in the :url (although, I can't test this at the moment.)