Answer the question
In order to leave comments, you need to log in
How to organize a system of subdomains?
Good day.
Recently, an unusual problem arose.
Let's say there are several subdomains:
domen1.site.ru; domain2.site.ru domain3.site.ru
And there is a domain:
site.ru; (in which the index.php file is located)
I need it to redirect me to the index.php file, which is located in the main domain, when I access any domain, but the address does not change.
For example:
site.ru - sends a request to index.php
site.ru/maps/sdwawda - sends a request to index.php
domen.site.ru - sends a request to index.php
domen.site.ru/maps/sdwawda - sends a request to index.php
Пробовал различное c файлом ".htacess", ничего не помогает.
Очень прошу помочь с данным вопросом и большое спасибо за внимание.
Answer the question
In order to leave comments, you need to log in
зачем вам htaccess?
если все адреса ведут в одно место, то достаточно ServerAlias в конфиге хоста.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question