Actually, the task is the following: we have a website with a page that needs to be done so that this page is processed as a subdomain

Can this be done via htaccess? I registered the aliases in the vds * settings. , so that the folders work like , now you need to transfer files to the subdomain format.

Thank you in advance for your help!

1 answer 1

Try this

RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^.+\.site\.ru$ RewriteCond %{REQUEST_URI} !/ RewriteRule ^(.*).html$ /$1 [L] 

There is no server at hand to check

  • Alas, but the script does not work: ( - banimtel