I
I
ILoveYAnny2016-05-28 13:28:03
Apache HTTP Server
ILoveYAnny, 2016-05-28 13:28:03

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

1 answer(s)
V
Viktor Taran, 2016-06-10
@shambler81

RewriteCond %{HTTP_HOST} ^!host\.ru$ [OR]
Denial

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question