Need advice on server settings. I am looking for solutions to the following tasks.
There is a server, say server.ru. You need to programmatically create (with emulate) a third-level domain (say, sub1.server.ru) without restarting the server. Then, you need to make all requests like:
sub1.server.ru/*
Redirected to:
sub1.server.ru/index.php?request=*
I tried to solve both problems using the .htaccess file. But I could not solve the problem of changing the address bar in the browser. Those. when accessing sub1.server.ru, redirection to server.ru/subs/sub1 occurred, and this way was displayed in the address bar.
But if you solve the problem of creating virtual hosts by changing the apache settings, you must restart the server, which is unacceptable.