Z
Z
zi2016-05-02 04:58:31
htaccess
zi, 2016-05-02 04:58:31

How to make redirects from the .com/ru/query/ domain to the .ru/query/ domain?

The whole point of the question is in the title, I can do a redirect, but it is necessary that the final address be without the /ru/ folder, that is, there is a domain with pages like xxx.com/ru/page1/ , you need to redirect to xxx.ru/page1/ , Is this possible with htaccess?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
adminstock, 2016-05-02
@adminstock

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^/ru/(.+)$ http://example.ru/$1 [L,R=301]
RewriteRule ^/de/(.+)$ http://example.de/$1 [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question