Skip to content

Domain redirect using rack-rewrite

production-hacks.com
1 pointdirtyhand2 comments
On HN

Comments

For god's sake please do it in nginx or apache assuming you have one of those in front of rack.

Right, you can achieve this easily in nginx/apache. The whole idea of the rack-rewrite gem (and this post) is to move those rewrite rules into your app's code repository. This way your app can be moved between web servers without having to rewrite those rules.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.