Home  >  Q&A  >  body text

python - django 域名301重定向设置的问题 ( 不带www重定向到带www的 )

我在apache设置绑定的域名

        ServerName www.imehorse.com
        ServerAlias imehorse.com

我的目的是想带用户访问imehorse.com 自动跳转到www.imehorse.com.
百度查了一下,基本上99%都是需要通过.htaccess这个文件来实现的.
但是django的程序大家也知道,跟php不一样.

那么要如何设置 才能完美的解决这个问题?

请看清楚问题再回答!!!!!!!

高洛峰高洛峰2717 days ago566

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:10:44

    Let everyone see the question clearly before answering
    The question is, have you figured out what you want to ask?
    Domain name redirection is not set up through apache. Do you want to rely on django to jump? Or you don’t know how to use uwsgi+apache?

    reply
    0
  • Cancelreply