As for htaccess to exclude the page from the common redirect and send it to another place?

Good day, please tell me how to add an exception and redirect to 2 pages in the other direction,namely

1) queries of the form host.ru to give a 404 error
2) But when you request
host.ru/page1 -> page1.host.ru
host.ru/page2 -> page2.host.ru

RewriteCond %{HTTP_HOST} ^host\.ru$ [OR]
RewriteCond %{HTTP_HOST} ^www\.host\.ru$
RewriteRule ^.*$ - [R=404]
July 9th 19 at 11:02
1 answer
July 9th 19 at 11:04
RewriteCond %{HTTP_HOST} ^!host\.ru$ [OR]
Denial
Then the redirect won't work, but in another place the page will not be redirected. But I have already solved the problem :) - Cortney.Okuneva commented on July 9th 19 at 11:07

Find more questions by tags ApachehtaccessWeb Development