0

I have created a basic signup/login form with PHP.

Now I want to let my website create a subdomain for every user signed up on my website.

For example, My domain is "mydomain.com" and "Tom Smith" registers through the 'register form' with his name. I would like my website to automatically create a subdomain: "tomsmith.mydomain.com".

What is the best way to do this?

Joshua Beckers
  • 857
  • 1
  • 11
  • 24
AryTuber
  • 49
  • 5
  • What server are you using? Apache or nginx? You could try something like this: https://stackoverflow.com/questions/10642426/htaccess-rewrite-subdomain-to-directory – Joshua Beckers Apr 22 '20 at 23:55
  • @JayBee apache, but that question/answer doesn't really cover on how to do this automaticly. – AryTuber Apr 22 '20 at 23:59
  • @AryTuber just create/aflter the config files via normal file reading and writing – Royal Bg Apr 23 '20 at 00:06

0 Answers0