Skip to content

Instantly share code, notes, and snippets.

@wagenet
Created November 10, 2011 22:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wagenet/1356384 to your computer and use it in GitHub Desktop.
Save wagenet/1356384 to your computer and use it in GitHub Desktop.
Static Hosting for Heroku
require 'rubygems'
require 'rack-rewrite'
use Rack::Rewrite do
rewrite /^(.*)\/$/, '$1/index.html'
r301 /^(.*)\/index.html$/, '$1/'
end
run Rack::Directory.new('output')
source :rubygems
gem 'rack-rewrite'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment