E
E
Eugene2015-04-13 15:55:24
htaccess
Eugene, 2015-04-13 15:55:24

How to fulfill condition in htaccess if not equal to URI?

RewriteCond %{REQUEST_URI} !^/admin/agenda [OR]
RewriteCond %{REQUEST_URI} !^/node/add/agenda
RewriteRule ^(.*)/agenda/?$ http://site.ru/agenda [R=301,L]

The essence is simple - you need to fulfill the condition if the URI is not equal to the first two conditions. Now the redirect is working properly

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2015-04-13
@Gravip

I understood everything :) It turned out [OR] is superfluous

S
ShamblerR, 2015-04-13
@ShamblerR

Please close the question and mark it as solved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question