title: How do I implement a redirects-only rack-based heroku application?
body: <p>I would like to create an rack application for deployment of heroku to create some 301 redirects to other subdomains.</p>
  
  <p>If the path would be carried over, it would be nice.</p>
  
  <p>I started with the following code, but it isn't working:</p>
  
  <pre class="lang-rb prettyprint-override"><code>require 'rack-force_domain'
  
  use Rack::ForceDomain, ENV["DOMAIN"]
  
  run lambda { |env| [200, {'Content-Type'=&gt;'text/plain'}, StringIO.new("Hello World!\n")] }
  </code></pre>