What are the best practices and measures for managing dynamic subdomains in various technologies and frameworks? I'm looking to implement some of my Django projects, but those solutions that I saw do not work. I also tried to use Apache rewrite mode to send requests to domain.com/subdomain from subdomain.com.domain.com, but it did not know how to do it with the demo.
Update: What do I need to do is create a virtual subdomain for the main domain using the user names from the site. So, if I have a new registered user called Jack, then when I jack Domains Com, then it will work in some operations. Just like I went to domain.com/users/jack but I do not want to create a real subdomain for every user.
You can do this with what you need with Apache mod_rewrite.
Obviously I did not read the question clearly.
How to do this in the Django: You can have some middleware which is the server name, and according to that redirect (or even a variable set) you do not have it with bare URL routing system Because it contains only path information, hostname information is not available.
Comments
Post a Comment