simple DomainsAliasMiddleware
Permit to redirect desired domain name to the 'domain' of Site app. Useful if you have different domains name for the same website. #1. Add to your settings DOMAINS_ALIAS like this: DOMAINS_ALIAS = ( 'my-second-domain.com', 'www.my-second-domain.com', 'third-domain.com', 'www.third-domain.com', ) notice: all these domains are redirected to the **domain** db entry of Site ID. #2. add all these domains to ServerAlias directive in your vhost apache configuration. #3. enable the middleware by adding to your MIDDLEWARE_CLASSES: MIDDLEWARE_CLASSES = ( ... 'utils.middleware.domainsalias.DomainsAliasMiddleware', ... )
- middleware
- redirect
- domain