开发者

Redirecting subdomains with the Rails router

开发者 https://www.devze.com 2023-03-11 01:07 出处:网络
We have an application which uses five subdomains.One of those subdomains is changing. I would like to be able to redirect everyone hitting the old domain to be redirected to the new one, and ideally

We have an application which uses five subdomains. One of those subdomains is changing.

I would like to be able to redirect everyone hitting the old domain to be redirected to the new one, and ideally use the Rails router so that I leave the processing there using Rack.

Is there a way of redirecting all traffic to one domain, to be redirected to another.

e.g all traffic to foo.app.com开发者_开发知识库 get's redirected to bar.foo.com, whilst maintaining the full path & query string.

As I am hosting with Heroku I have no .htaccess.


Refraction may be able to help with that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号