Rack for Easy HTTP redirect
We recently moved our class sign-up to EventBrite. It used to be hosted on heroku with the subdomain classes.blazingcloud.net. However, when we changed our DNS to direct to eventbrite, it didn’t end up targetting our eventbrite subdomain: blazingcloud.eventbrite.com — hitting the EventBrite homepage instead. Rack to the rescue!
We set up another Heroku app with just a one-line rack application. All it needed was a rackup config file, called “config.ru” with the following line:
1 2 |
run Proc.new { [ 302, {'Location'=> 'http://blazingcloud.eventbrite.com' }, [] ] } |
and voila! It does a simple re-direct to the new site.