W
W
WeStlik2020-08-31 19:07:06
PHP
WeStlik, 2020-08-31 19:07:06

How to open the PU of each subdomain with dynamic subdomains?

Good day.
I create dynamic subdomains through the .htaccess file:

RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.site\.ru$
RewriteCond %{HTTP_HOST} ^(.*)\.site\.ru$
RewriteRule ^(.*)$ https://site.ru/blog.php?user=%1 [L,P]


Only the main page of the blog works with this code, for example "user1.site.ru".
You need to make it possible to open the control panel, i.e. "user1.site.ru/panel".
At the moment, when opening the PU, it still shows the main page. The search did not give success, tell me something

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2020-08-31
@FanatPHP

You open the blog.php file in the editor
, look for the code that displays the pages,
you find an error in it , you
fix it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question