Answer the question
In order to leave comments, you need to log in
How to exclude a page from a general redirect in htaccess and direct it to another location?
Good afternoon, please tell me how to add an exception and redirect 2 pages out of all in the other direction, namely
1) When requesting host.ru, give a 404 error
2) But when requesting
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]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question