Skip to content

Commit

Permalink
Merge pull request #519 from ngorskikh/fix/AG-33766
Browse files Browse the repository at this point in the history
Fix $urltransform description
  • Loading branch information
ngorskikh authored Sep 16, 2024
2 parents d6decf4 + 6ffb506 commit 2f21053
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions docs/general/ad-filtering/create-own-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,7 @@ Rules with `$replace` modifier are supported by AdGuard for Windows, AdGuard for
:::
#### **`urltransform`** {#urltransform-modifier}
#### **`$urltransform`** {#urltransform-modifier}
The `$urltransform` rules allow you to modify the request URL by replacing text matched by a regular expression.
Expand Down Expand Up @@ -2708,7 +2708,7 @@ There are three parts in this rule:
**Re-matching rules after transforming the URL**
If the `$urltransform` rule is applied to a request, all the rules will be re-evaluated against the new URL.
After applying all matching `$urltransform` rules, the transformed request will be matched against all other rules:
E.g., with the following rules:
Expand All @@ -2717,16 +2717,7 @@ E.g., with the following rules:
||example.com/secondpath^
```
the request to `https://example.com/firstpath` will be blocked before it is sent.
However, `$urltransform` rules will **not be re-applied** in this case to avoid infinite recursion, e.g., with the following rules:
```adblock
||example.com/firstpath^$urltransform=/firstpath/secondpath/
||example.com/secondpath^$urltransform=/secondpath/firstpath/
```
the request to `https://example.com/firstpath` will be transformed to `https://example.com/secondpath` and the second rule will not be applied.
the request to `https://example.com/firstpath` will be blocked.
**Disabling `$urltransform` rules**
Expand Down

0 comments on commit 2f21053

Please sign in to comment.