Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Apply rewrite rules first, then serve static content.

  • Loading branch information...
commit 3d1846604c58b2df8045b5447abbd2f32a7cc009 1 parent 2fd2865
@nelstrom authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 config.ru
View
4 config.ru
@@ -1,8 +1,8 @@
require "rubygems"
require 'rack/rewrite'
-use Rack::Static, :urls => ['/'], :root => "public"
use Rack::Rewrite do
- rewrite '/$', '/index.html'
+ rewrite '/', '/index.html'
end
+use Rack::Static, :urls => ['/'], :root => "public"
run Rack::Directory.new('public')
Please sign in to comment.
Something went wrong with that request. Please try again.