Permalink
Browse files

Update README with how to specify an external config file

  • Loading branch information...
1 parent fa414be commit 06904421ba2317bd3e6d1ae285853d47bc8995b3 @jordelver committed Jan 19, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 README.rdoc
View
@@ -31,6 +31,15 @@ can get away with rack-rewrite instead of writing Apache mod_rewrite rules.
r301 %r{/wiki/(\w+)_\w+}, '/$1'
end
+=== Specify an external rules file AND additional rules in the block
+
+ config.middleware.insert_before(Rack::Lock, Rack::Rewrite, :rules => 'config/rules.rb') do
+ rewrite '/wiki/John_Trupiano', '/john'
+ r301 '/wiki/Yair_Flicker', '/yair'
+ r302 '/wiki/Greg_Jastrab', '/greg'
+ r301 %r{/wiki/(\w+)_\w+}, '/$1'
+ end
+
== Use Cases
=== Rebuild of existing site in a new technology

0 comments on commit 0690442

Please sign in to comment.