【问题标题】:how to use single site for www and root in django sites framework如何在 django 站点框架中为 www 和 root 使用单个站点
【发布时间】:2017-02-28 01:39:20
【问题描述】:

我目前只有一个站点,但我想扩展到多个站点以在 django 中使用。

目前,我的 django_sites 表中必须有两个条目用于我的单个站点:

1   mysite.com  My Site
2   www.mysite.com  My Site

现在我想拥有多个站点,每个子域拥有多个条目不再可行,因为我想与与站点关联的对象创建多对多关系。

如何在每个站点使用一个 www 和根域而不是两个?

【问题讨论】:

    标签: python django .htaccess subdomain django-sites


    【解决方案1】:

    我在 httpd 和 ssl.conf 中的 apache 级别处理了这个

    我在这里关注了这个答案apache redirect from non www to www

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-06
      • 1970-01-01
      • 2012-09-15
      • 2017-10-24
      • 2016-02-27
      • 2017-03-31
      • 2011-04-14
      • 2011-06-24
      相关资源
      最近更新 更多