База знаний

How rule order changes the result

Эта статья есть на вашем языке: Как порядок правил влияет на результат

WebShield evaluates ordinary rules from top to bottom and uses the first matching rule. Put a narrow exception before a broader rule that could match the same request.

Open WebShield → example.com → Правила (Rules), replacing the domain with yours. Rules and their allowed number depend on your plan. Review every rule that could match the request; matching one rule does not establish the result of the whole chain.

Two redirects

Suppose /old/special should redirect to /new-special, while other paths inside /old/ should redirect to /archive.

  1. Create a narrow Редирект (Redirect) rule with Адрес → Равно → /old/special (Path equals), destination /new-special, and 302 Временно (Temporary).
  2. Create a broader Редирект rule with Адрес → Начинается с → /old/ (Path starts with), destination /archive, and the same temporary status.
  3. Place the narrow rule above the broad rule using Выше and Ниже (Up and Down). Moving rules saves automatically; allow deployment.
  4. Check live responses for /old/special and /old/other. Their Location headers should point to /new-special and /archive, respectively.

Reversing the order makes /old/special match the broad rule first. The narrow rule will not be reached. See URL redirects for the remaining controls.

Rules outside the chain

Ограничить (Limit) and Не ограничивать (Do not limit) show Порядок не важен (Order does not matter). They operate independently of ordinary rules' first match. Moving a limit down does not disable it; an exception does not need to be above it.

Use a dedicated exception to bypass limits only. The simulator checks the open rule's conditions and cannot identify the winning rule in the full list. Test live requests and unaffected pages after reordering.

Статья была полезна?