How do you write a recount at a...htaccess if the domen changed?
-
There's an old subway site like 2015.site.ru
Changed the main site.ru on 2015.site.moscow
Now we need all communications to 2015.site.ru to be addressed to 2015.site.moscow.
And naturally, not only the treatment of the dominance indens, but any other, for example, http://2015.site.ru/images/pic.gif transformed into http://2015.site.moscow/images/pic.gif
However, with reference to the site ' s main site, there must be no diversion to the site.moscow. Can you tell me how to put it in a htaccess?
-
It's just a classic. https://serverfault.com/a/124490/292034 :
rewriteengine on rewritecond %{HTTP_HOST} ^a\.example\.com rewriterule ^(.*)$ http://b.example.com/$1 [r,l]
information: http://wiki.apache.org/httpd/WhenNotToUseRewrite