Answer the question
In order to leave comments, you need to log in
How to implement dynamic content on site subdomains?
Good afternoon
There is a site with articles written by users themselves
. Also, when registering, the user is invited to make his own site, which will appear on a subdomain like
username.sitename.com
The subdomain should also have articles, the same design, in general, a complete copy of the parent but articles of the "owner" should always be in the top
But - any change in the "parent" site should entail a change in
ALL
subdomains
parent and given to subdomains
Question: Is this a very "heavy" solution (in terms of traffic, load on the server), and is there an alternative to it within the framework of the current task
Number of subdomains - 100-200 thousand
Answer the question
In order to leave comments, you need to log in
This is done very simply.
The server (nginx for example) is configured to route all requests, including subdomains, to one point. Further, on the side of your framework, you do internal routing based on parsing URLs and domains, saving the current subdomain somewhere in the repository.
https://serverfault.com/questions/510964/htaccess-...
https://www.google.ru/webhp?sourceid=chrome-instan...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question