Reputation: 12066
I ran into this issue and couldn't find a concise and beautiful solution for the configuration. I would like to redirect all requests that match a specific pattern to another host and include any path provided in the request.
http://host1.com/something -> http://host2.com/something
http://host1.com/something/something -> http://host2.com/something/something
Upvotes: 0
Views: 119
Reputation: 12066
This was the solution and I hope it saves someone time!
get 'something(/*path)', to: redirect {|params, request| 'http://host2.com' + request.path}
Upvotes: 1