K
K
kiruyshka2014-11-13 16:22:36
Domain name market
kiruyshka, 2014-11-13 16:22:36

How to create regional subdomains?

Hello! Since the beginning of the week I've been scratching my head, I ran into such a problem.
There is a website, the task is to make it multi-regional, that is, spb.site.ru, etc. In addition to the contact phone number, the information on the site will not differ.
The question is, is it possible to implement these subdomains without setting up the server, i.e. not flattery in the httpconfig settings, but use only htaccess rules? To get the subdomain as a variable in the future and work with it further?
Thanks in advance:)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
U
ugodrus, 2014-11-13
@kiruyshka

No problem in principle. Attach subdomains to the main alias. And no rewrites. You take the current domain from the environment and work with it. In places where you need to put dynamic content on the domain name.
In modx, doing this takes 3 minutes.

S
Sergey, 2014-11-13
@bk0011m

wiki.umisoft.ru/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%... - Is it?

K
kompi, 2014-11-13
@kompi

Write a rewrite like this:
spb.site.ru$query > site.ru/index?h=$host&q=$query

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question