A
A
Akaero2018-02-15 13:48:51
PHP
Akaero, 2018-02-15 13:48:51

How to display different links depending on the url?

Good afternoon.
Superstrange question, but it is important to understand whether it is possible to do so
.
Two domains A.site.ru and B.site.ru lead to 1 page.
It is necessary: ​​depending on the domain, substitute either one link or another.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Akaero, 2018-02-15
@Akaero

Found the answer.
You can get a subdomain like this:

array_shift((explode('.', $_SERVER['HTTP_HOST'])));

and then put a condition on the conclusion

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question