Permalink
Browse files

Apply rewrite rules first, then serve static content.

  • Loading branch information...
1 parent 2fd2865 commit 3d1846604c58b2df8045b5447abbd2f32a7cc009 @nelstrom committed Mar 25, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 config.ru
View
@@ -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')

0 comments on commit 3d18466

Please sign in to comment.