L
L
Letum2020-08-24 19:26:45
htaccess
Letum, 2020-08-24 19:26:45

How to register a redirect from a subfolder?

How to write a redirect in htaccess from a subfolder of one domain to the same subfolder of another domain.
From domain1.ru/subfolder to domain2.ru/subfolder

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-08-24
@Letum

RewriteCond %{HTTP_HOST}  ^(www\.)?domain1\.ru$  [NC]
RewriteRule ^subfolder.*  http://domain2.ru/$0 [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question