S
S
Sergey Volevach2015-01-01 21:15:08
Apache HTTP Server
Sergey Volevach, 2015-01-01 21:15:08

How to redirect from old to new domain?

There was a bilingual site mysite.com. Russian mysite.com/ru/, English mysite.com/en/. It was decided to split it into mysite.ru and mysite.com. How to redirect mysite.com/en/page to mysite.com/page ? And mysite.com/ru/page to mysite.ru/page/?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2015-01-02
@IceJOKER

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^(en|ru)(.*)$ http://mysite.$1/$2 [R=301,L]

Something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question