Hello. There is a question, someone has probably already solved it or did something similar.

The head recently does not work, it's time to leave probably.

essence of the question.

have an address


This is his office.

Need to be

  vasya.somesite.ru тоже самое что и somesite.ru/user/vasya/ 

those. when registering in the system, the user appears a subdomain with his nickname. And he took the data from the page somesite.ru/user/vasya/

how to set this thing up, who knows, the head refuses to work.

  • Fine! straight to the point! - Artem

1 answer 1

Well, I would solve it with the help of DNS, such as * .somesite.ru A site's IP-address (i.e. ANY subdomains of somesite.ru were tracked to your site), and already processed subdomains with a script. no htaccess ... so vsyakaya-fingya.somesite.ru will still lead to your site, and depending on the requests, you will output something.

and what does it mean "And he took the data from the page somesite.ru/user/vasya/"? Do you have CNC or physical directories on the disk?

  • yes no, of course not physical. This is a CNC from htaccess + Yii He scored vasya.somesite.ru and in response to him on this domain, a page of his profile was opened somesite.ru/user/vasya/ type. Pro record is good, it is profitable. stepped however. :) - Artem
  • Yes, if you plan such a system, then it’s better to solve the DNSom ... I also thought to solve this htaccess first, it was good, until there were a few subdomains, but then the gemmor began with this) and suffered a debriefing inside the script ... - thunder
  • The only thing to remember is to transfer www and all other necessary subdomains before writing to * .somesite.ru otherwise ...;) - thunder