Answer the question
In order to leave comments, you need to log in
How to make site.ru on one hosting, www.site.ru on another?
How can I make sure that site.ru is on one hosting, and www.site.ru is on another? At the same time, it is necessary that from site.ru there is a redirect to www.site.ru. The main goal of this action is that when checking in various services, site.ru shows the DNS of site.ru hosting, and not hosting www.site.ru. The idea so far is this, physically the site is located on www.site.ru, and .htaccess with a redirect is located on site.ru
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.ru$ [NC]
RewriteRule ^(.*)$ http://www.site.ru/$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question