Skip to content

Instantly share code, notes, and snippets.

@calebhaye
Forked from rmanalan/.gems
Created April 21, 2012 07:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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