Well, the question is already written in the subject, I will add only from myself:
site on vds and subdomain for the mobile version, so that the appeal was in the same directory as the main domain, but only to a separate file.
Is it possible to do this?
This can of course be recognized by experimenting on the server, but I don’t have too much, just the main one, so I decided to ask a question.
Thanks for the answer.


Example:
domen.com - /www/index.php
m.domen.com - /www/index_m.php

  • In the web server configuration, you specify the same folder for the subdomain as for the main one (for example, by making it an alias) and write the rewrite rule ( Mike
  • I did not understand something. It is possible an example in the form of a code for configs? - Albert Ushakov
  • komtet.ru/lib/etc/ispconfig/ispconfig-3/... as it is, only the right side of the rule is not a directory, but simply /index_m.php and decide what to do with the parameters. And you would indicate in the question which web server they are all configured in different ways - Mike
  • Is this done via .htaccess? I thought through the host file. - Albert Ushakov
  • host exactly nothing to do with. He is responsible for the conversion of names to ip, and only for the local machine. You should register a subdomain in your DNS with the same ip, which is the same as the host for all only. And what you are asking for is the web server settings. Although .htaccess, at least configs web-server. By the way, if in configs, then you can explicitly describe a section for this subdomain, a full copy of the main site section, just specify IndexFile index_m.php and even rewrite is not needed - Mike

0