Skip to content

Instantly share code, notes, and snippets.

@calebhaye
Forked from rmanalan/.gems
Created April 21, 2012 07:13
Show Gist options
  • Save calebhaye/2435168 to your computer and use it in GitHub Desktop.
Save calebhaye/2435168 to your computer and use it in GitHub Desktop.
Static websites using Heroku
rack-contrib
rack-rewrite
require "rubygems"
require 'rack/contrib'
require 'rack-rewrite'
use Rack::Static, :urls => ['/images'], :root => "public"
use Rack::ETag
use Rack::Rewrite do
rewrite '/', '/index.html'
end
run Rack::Directory.new('public')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment