T
T
Taras Kurbatov2019-08-31 12:36:46
1C-Bitrix
Taras Kurbatov, 2019-08-31 12:36:46

How to redirect to a new domain?

Tell me how to make a redirect to a new domain.
There is a site https://example.com
You need to redirect to a new domain https://example.org - this is its copy
. Second-level pages are redirected normally, but such as example.com/page/page2 do not work. Moves here https://example.org/bitrix/urlrewrite.php
In .htaccess I wrote

RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ https://example.org/$1 [L,R=301]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-08-31
@TarasKurbatov

RewriteRule ^(.*)$ https://svai-a.ru/$1 [L,R=301]
This rule must be placed at the beginning of the .htaccess file so that the redirect is above the rest of the RewriteRule.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question