Django-使用www重定向到版本 [英] Django - redirect to version with www
本文介绍了Django-使用www重定向到版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Django中,是否有一种简单的方法可以将所有内容从无www的域名重定向到带有该域名的版本?我的意思是从http:// example.com到http:// www.example.com。
Is in Django a simple way to redirect everything from domain without www to version with it? I mean from http:// example.com to http:// www.example.com.
推荐答案
我有。
https://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#prepend-www
这篇关于Django-使用www重定向到版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文