Lean and simple host redirection via Rack middleware
Rack middleware to redirect requests based on path, but can be easily extended to match hostname, user-agent, or whatever might be available in the request.
A gem that provides a simple example of rewrites in rack
Rack::LocaleRootRedirect uses Rack:Accept to map '/' to a path based on the `Accept-Language` HTTP header.
Rack::DomainRedirect is a tiny rack middleware for redirecting to the configurable domain. If user request's the service from domain other than that configured it redirects to the first domain on the configuration list. If no domain is configured it does noting and passes requests to another application in the chain.
Remove or add www and trailing slash from urls for Rack applications. Use it if you can not edit Nginx or Apache configs.
Fixes an obscure issue with redirects that happens with IE and SSL