A
A
Andrey2021-05-25 16:36:38
URL Handling
Andrey, 2021-05-25 16:36:38

How to redirect from domain to domain to all pages?

How to make a full redirect?
changed the domain, set a redirect,
but not all pages redirect to a new domain,
how to make it redirect to a new one when visiting any page of the old domain?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zettabyte, 2021-05-25
@klekovkinandrey

The question is not well-defined, and your code is not there, but here is the code for relocating while keeping the paths in the URLs:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(?:www\.)OldDomain\.ru$ [NC]
RewriteRule ^ https://NewDomain.ru%{REQUEST_URI} [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question