Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #720 from AdguardTeam/feature/redirect_disabling
Browse files Browse the repository at this point in the history
Disabling redirect rules
  • Loading branch information
ameshkov authored Dec 14, 2020
2 parents 2bb74bd + 6caa3d2 commit a6f694c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 01.general/02.how-to-create-your-own-ad-filters/docs.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,11 @@ AdGuard uses the same filtering rules syntax as uBlock Origin. Also, it is compa
>`$redirect` rules' priority is higher than the regular basic blocking rules' priority. This means that if there's a basic blocking rule (even with `$important` modifier), `$redirect` rule will prevail over it. If there's a whitelist (@@) rule matching the same URL, it will disable redirecting as well (unless the `$redirect` rule is also marked as `$important`).
##### Disabling `$redirect` rules

* `@@||example.org^$redirect` will disable all `$redirect` rules for URLs that match `||example.org^`.
* `@@||example.org^$redirect=redirectName` will disable all rules with `$redirect=redirectName` for any request that matches `||example.org^`.

##### `redirect` examples

```
Expand Down
5 changes: 5 additions & 0 deletions 01.general/02.how-to-create-your-own-ad-filters/docs.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,11 @@ AdGuard использует тот ж синтаксис правил филь
> Приоритетность правил `$redirect` выше, чем у обычных базовых правил блокировки. Это означает, что, если есть базовое правило (даже с модификатором`$important`), `$redirect` будет иметь над ним преимущество. Если есть белый список (@@) с совпадающим URL, он также заблокирует переадресацию (только если правило `$redirect` также не отмечено как `$important`).
###### Отключение правил `$redirect`

* `@@||example.org^$redirect` отключит все правила `$redirect` для всех запросов, соответствующих `||example.org^`.
* `@@||example.org^$redirect=redirectName` отключит правила с `$redirect=redirectName` для всех запросов, соответствующих `||example.org^`.

##### примеры `redirect`

```
Expand Down

0 comments on commit a6f694c

Please sign in to comment.