So we have a .php file that creates a directory that is named after user input from a form, and uses file_put_contents to have a n index.php already in that directory. Our problem is that it can be only accessed by website.com/domain instead of domain.website.com. How would I automatically assign a subdomain with the same name to the directory? We have tried just about everything the internet will give us, and have been stuck for 3 hrs. We are using Apache on Debian.
How can I make all created directories assign to a subdomain?
domains;htaccess;subdomain