##match '/news/:content_id:URLパターン' => 'news#show:ルート先(コントローラ名#アクション名)'
routes.rb
match '/news/:content_id' => 'news#show'
/new/:content_id(.:format) {:controller=>"news", :action=>"show"}
例. /news/aspnet01、news/108
match 'hello/intro'
hello_intro/hello/intro(.:format)
{:controller=>"hello", :action=>"intro"}
例. /hello/intro
match '/products/*keywords/:product_id' => 'producr#show'
/products/*keywords/:product_id(.:format)
{:controller=>"products", :action=>"show"}
例. /products/ruby/rails/wings/development/108
match ':controller(/:action(/:id(.:format)))'
/:controller(/:action(/:id(.:format)))
例. /hello、 /model/select、 /books/show/108、 /blogs/show/1.xml
##match 'hello/intro:URLパターン', :via => :'get:HTTPメソッド'
routes.rb
match 'hello/intro', :via => :get
hello_intro GET /hello/intro(.:format)
{:controller=>"hello", :action=>"intro"}
get 'hello/intro'
hello_intro GET /hello/intro(.:format)
{:controller=>"hello", :action=>"intro"}
match 'hello/process', :via => [:get, :post]
hello_intro GET/POST /hello/intro(.:format)
{:controller=>"hello", :action=>"process"}
##match '/new/content_id:URLパターン' => redirect('/articles/%{content_id}:リダイレクト先URLパターン')
match '/news/:content_id:URLパターン' =>
redirect {|'p:パラメータ情報', 'req:リクエスト情報'| "/articles/#{p[:content_id].to_i + 1000}:リダイレクト先のを構築する式"}
routes.rb
match '/new/content_id' => redirect('/articles/%{content_id}')
match '/news/:content_id' =>
redirect {|p, req| "/articles/#{p[:content_id].to_i + 1000}"}
##match '/news(/:content_id):URLパターン', => 'news#show:ルート先'
:defaults => [ ':content_id:パラメータ名' => '1:デフォルト値']
routes.rb
match '/news(/:content_id)', => 'news#show'
:defaults => [ :content_id => 1, :format => :json]
/news(:content_id)(.:format)
(:content_id=>1, :format=>;json, :controller=>"news", :action=>"show")
##match '/books:URLパターン' => 'books#list:ルート先', :as => ':article:ヘルパー名'
routes.rb
#「/books」に対応するUrlヘルパーはarticle_url,article_path
match '/books' => 'books#list', :as => :article
article /books(.:format) {:controller=>"books", :action+>"list"}