Skip to content

Instantly share code, notes, and snippets.

@rmanalan
Created January 25, 2010 20:54
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save rmanalan/286233 to your computer and use it in GitHub Desktop.
Save rmanalan/286233 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