P
P
Prosto2015-11-30 21:09:31
htaccess
Prosto, 2015-11-30 21:09:31

How to add exception to RewriteRule?

Hello!
Please help me set up a redirect: redirect all requests to http://www, except for two requests: https://domain.ru/pay/check and https://domain.ru/pay/aviso they should work with/without www

RewriteCond %{HTTP_HOST} ^domain.ru$ [NC]
RewriteCond %{REQUEST_URI} !^pay/check //не помагает
RewriteRule ^(.*)$ http://www.domain.ru/$1 [R=301,L]

(the problem appeared after the main mirror was changed by Yandex, and the cash desk. Yandex cannot change the address for sending requests in any way)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Prosto, 2015-12-01
@Prosto

this condition helped.
RewriteCond %{HTTP_USER_AGENT} !yandex.money [NC]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question