You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cloudhead edited this page Sep 13, 2010
·
1 revision
Rewriting http://www.yoursite.com to http://yoursite.com
gem 'rack-rewrite', '~> 0.2.1'
require 'rack-rewrite'
if ENV['RACK_ENV'] == 'production'
use Rack::Rewrite do
r301 %r{.*}, 'http://yoursite.com$&', :if => Proc.new do |rack_env|
rack_env['SERVER_NAME'] != 'yoursite.com'
end
end
end