【发布时间】:2015-03-09 06:43:26
【问题描述】:
我有我的网址:
url(r'^home/', HomeQuestionView, name='home_question') ,
当我输入localhost:8000/home 时,我得到了我的主页,但我想要的是当我刚刚输入时,我得到了我的主页。
我的意思是当用户只输入我的网站时,我想重定向到上面的主页网址,例如www.xyz.com 而不是www.xyz.com/home
我不想这样配置
url(r'^', HomeQuestionView, name='home_question') ,
提前感谢
【问题讨论】:
-
您不想使用 r'^' 配置的任何特殊原因?
-
您不想让您的网站按照您想要的方式运行吗?