Redirect only home page without affecting the child pages possible?

Tell me is it possible to do a redirect only the home page (say www.test.ru on another site www.toster.ru), but with its child pages (say www.test.ru/news/ or www.test.ru/news.php?id=32) to redirect was not. Thank you.
July 8th 19 at 15:30
4 answers
July 8th 19 at 15:32
A regular 301 redirect
July 8th 19 at 15:34
RewriteRule ^/$ http://example.org/ [L,R=301]
July 8th 19 at 15:36
nope not working now I thoroughly understand that I can not do that

RewriteEngine On
RewriteRule ^/$ example.org [L,R=301]
July 8th 19 at 15:38
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ example.org [L,R=301]

Find more questions by tags PHPhtaccess