Creating a rails route to an external URL

I know this is old, so in case someone else needs this for rails 4:

get "/blog" => redirect("http://example.com/blog")

Use get instead of Match in Rails 4, otherwise you’ll get a Runtime error

Leave a Comment