My app used to run on foo.tld but now it runs on bar.tld. Requests will still come in for foo.tld, I want to redirect them to bar.tld.
How can I do this in rails routes?
Bit more modern approach:
constraints(host: 'www.mydomain.com') do
get '/:param' => redirect('https://www.mynewurl.com/%{param}')
end