Answer the question
In order to leave comments, you need to log in
Is it possible to redirect only from the main page without affecting child pages?
Tell me if it is possible to redirect only from the main page of the site (for example, from www.test.ru to another site www.toster.ru), but from its child pages (for example, from www.test.ru/news/ or www.test. ru/news.php?id=32) so that there is no redirect. Thank you.
Answer the question
In order to leave comments, you need to log in
no, it doesn't work now, I'll look into it in detail, maybe I'm doing something wrong,
RewriteEngine On
RewriteRule ^/$ example.org [L,R=301]
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ example.org [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question