U
U
ummahusla2015-05-14 17:40:41
Domain name market
ummahusla, 2015-05-14 17:40:41

How to make it so that when a user registers, a subdomain is created?

Those. let's say I have a registration form on the site, I want that, when registering an account, the account is linked to its subdomain, on which it would already work and the service would work and the user would perform all the actions he needs. How to implement such a system, the PHP + JS technology stack, and hosting has cPanel.
The idea is that the structure: domain.com/users/username1 needs to be converted to username1.domain.com

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-05-14
@shendel

In the DNS records of the domain, add an A record with the name "@" and specify your ip - after that, requests for all subdomains will go to your ip
On your side, parse HTTP_HOST or redirect through .htaccess

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question