将www url地址重定向到非www
django-redirect-to-non-www的Python项目详细描述
django重定向到非www
将w ww url地址重定向到非www。
安装
pip install django-redirect-to-non-www
pip install git+https://git@github.com/lukasvinclav/django-redirect-to-non-www.git
配置
打开设置文件并将中间件redirect_附加到middleware列表末尾的非w ww.middleware.redirecttononwww。
MIDDLEWARE=[# Other middleware classes'redirect_to_non_www.middleware.RedirectToNonWww',]