简体   繁体   中英

how to use single site for www and root in django sites framework

I currently have a single site, but I want to expand to several sites for use in django.

I currently must have two entries in my django_sites table for my single site:

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

Now that I want to have multiple sites, having multiple entries per subdomain is not feasible anymore since I want to create many to many relationships with objects associated with the sites.

How can I use a single www and root domain per site instead of the two?

I handled this at the apache level in the httpd and ssl.conf

I followed this answer here apache redirect from non www to www

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM