Reputation: 1
I have a requirement to redirect web request to another url in rails.
Lets take my current app is xyz.com. If I hit the xyz.com/mno/dashboard, it has to redirect to abc.com/dashboard.
Upvotes: 0
Views: 69
Reputation: 10898
You can just handle this in your routes.rb
config:
get '/mno/dashboard', to: redirect('http://example.com/dashboard')
(Note - replace example.com with abc.com. StackOverflow wont allow any other domain if prefixed with http(s)://)
Upvotes: 2