S
S
svd712014-01-26 22:57:59
PHP
svd71, 2014-01-26 22:57:59

How to organize the processing of third-level domains on the site?

How can you organize the processing of third-level domains, owning a second-level domain? What needs to be changed in Apache settings? If there are at least two virtual hosts on the server (for example, on different ports), then won't this interfere with such work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-01-26
Protko @Fesor

you need to register in dns that all third-level hosts lead to your server (just an asterisk in the domain name). This method has its drawbacks, but it is the simplest.
Then change the virtual host settings so that it is bound only to the port number, but not to the hostname.
Also, for convenience, you can throw a third-level domain through rewrite as a parameter to the request, for more convenient work from php.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question