Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
Added rack-rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Apr 6, 2010
1 parent 148a260 commit 075bacc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gems
@@ -0,0 +1 @@
rack-rewrite
9 changes: 9 additions & 0 deletions config/environment.rb
Expand Up @@ -40,4 +40,13 @@
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :de

config.gem 'rack-rewrite', '~> 0.2.0'
require 'rack-rewrite'
config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
r301 %r{.*}, 'http://feeddit.com$&', :if => Proc.new {|rack_env|
rack_env['SERVER_NAME'] != 'budechalet.com'
}
r301 '/index.html', '/'
end
end

0 comments on commit 075bacc

Please sign in to comment.