Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (12 sloc) 0.617 kB
An app to automatically redirect alternate hostnames to their canonical
sites. Developed for a dynamic-multitenancy implementation, but could be
useful otherwise as well.
USAGE:
- Add the middleware to the top of your middleware list (so it is
processed first at request time).
- Add redirects to your actual sites from their alternate domain names.
OPTIONAL FEATURES:
- Set CATCHALL_REDIRECT_HOSTNAME='example.com' to automatically redirect
unknown hostnames to that site. (optional)
- Set REMOVE_WWW=True to remove "www." from the beginning of hostnames
and redirect (opposite of PREPEND_WWW). (optional)
Jump to Line
Something went wrong with that request. Please try again.