tylerhunt

Rack middleware submitted by tylerhunt

Sort by: Latest | Highest rated

Canonical Host

Added by tylerhunt at October 09, 2009 18:12 Star_small_grayStar_small_grayStar_small_grayStar_small_grayStar_small_gray

There are often times when you'll need to redirect requests for some domains or subdomains to a single canonical host. This middleware lets you specify the canonical host for your application, and will perform a 301 redirect for all non-canonical requests. One of the most common use cases is to redirect the a subdomain like www to the the root domain, or vice versa.