4
4
4shamrock2014-11-27 15:40:05
htaccess
4shamrock, 2014-11-27 15:40:05

How to redirect to a subdomain (htaccess)?

Hello everyone, please help with redirection. I need all requests for any pages, for example, site.ru , to be redirected to en.site.ru (to the main page of the subdomain). I read the manuals, but something does not work. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2014-11-27
@morontt

RewriteEngine On

RewriteCond %{HTTP_HOST} ^site\.ru$ [NC]
RewriteRule ^(.*)$ http://en.site.ru/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question