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

Redirect-rule modifier description #817

Merged
merged 6 commits into from
May 12, 2021

Conversation

el-termikael
Copy link
Contributor

Closes #815

@@ -980,6 +981,19 @@ This rule redirects all requests to `example.org/test.mp4` to the resource named

> **Compatibility with different versions of AdGuard.** This type of rules is not supported by AdGuard for iOS and Safari.

<a id="redirect-rule-modifier"></a>
#### `redirect-rule`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В жирненький надо завернуть, чтобы было как везде

@@ -980,6 +981,19 @@ This rule redirects all requests to `example.org/test.mp4` to the resource named

> **Compatibility with different versions of AdGuard.** This type of rules is not supported by AdGuard for iOS and Safari.

<a id="redirect-rule-modifier"></a>
#### `redirect-rule`
This is basically an alias to $redirect since it has the same "redirection" values and the logic is almost similar. The difference is that $redirect-rule is applied only in the case when the target request is blocked by a different basic rule.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$redirect и $redirect-rule завернуть в такие кавычки: `


Examples:

`||example.org/script.js`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Строчки с примерами завернуть сверху и снизу в тройные кавычки: ```

@el-termikael el-termikael requested a review from vbagirov May 11, 2021 14:42
vbagirov
vbagirov previously approved these changes May 11, 2021
Copy link
Contributor

@sxgunchenko sxgunchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А русский же тоже надо?

@vbagirov
Copy link
Member

@sxgunchenko смысл был проверить суть на англ, если там всё ок, то переводить на ру.

#### **`redirect-rule`**
По сути, это тот же `$redirect`, поскольку у него тоже есть свойства "перенаправления" и логика у них практически аналогичная. Разница в том, что `$redirect-rule` применяется только в случае, если целевой запрос заблокирован другим базовым правилом.

> Отрицание `$redirect-rule` работает точно так же, как для обычных правил `$redirect`. Даже более того, `@@|||example.org^$redirect` будет отрицать как правило `$redirect`, так и `$redirect-rule`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай тут везде "отрицание" заменим на "отмену"

#### **`redirect-rule`**
По сути, это тот же `$redirect`, поскольку у него тоже есть свойства "перенаправления" и логика у них практически аналогичная. Разница в том, что `$redirect-rule` применяется только в случае, если целевой запрос заблокирован другим базовым правилом.

> Отрицание `$redirect-rule` работает точно так же, как для обычных правил `$redirect`. Даже более того, `@@|||example.org^$redirect` будет отрицать как правило `$redirect`, так и `$redirect-rule`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут скорее не отрицание, а отключение, как в других модификаторах (например, $replace)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не успел :)

#### **`redirect-rule`**
По сути, это тот же `$redirect`, поскольку у него тоже есть свойства "перенаправления" и логика у них практически аналогичная. Разница в том, что `$redirect-rule` применяется только в случае, если целевой запрос заблокирован другим базовым правилом.

> Отрицание `$redirect-rule` работает точно так же, как для обычных правил `$redirect`. Даже более того, `@@|||example.org^$redirect` будет отрицать как правило `$redirect`, так и `$redirect-rule`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лишняя палка в примере правила: @@|||example...

#### **`redirect-rule`**
По сути, это тот же `$redirect`, поскольку у него тоже есть свойства "перенаправления" и логика у них практически аналогичная. Разница в том, что `$redirect-rule` применяется только в случае, если целевой запрос заблокирован другим базовым правилом.

> Отрицание `$redirect-rule` работает точно так же, как для обычных правил `$redirect`. Даже более того, `@@|||example.org^$redirect` будет отрицать как правило `$redirect`, так и `$redirect-rule`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@||example.org^$redirect — то есть два символа |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

как правила

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

первое поправила, со вторым не согласна

@@ -975,6 +976,21 @@ AdGuard использует тот же синтаксис правил фил

> **Совместимость с различными версиями AdGuard.** Этот тип правил не поддерживается AdGuard для iOS и для Safari.

<a id="redirect-rule-modifier"></a>
#### **`redirect-rule`**
По сути, это тот же `$redirect`, поскольку у него тоже есть свойства "перенаправления" и логика у них практически аналогичная. Разница в том, что `$redirect-rule` применяется только в случае, если целевой запрос заблокирован другим базовым правилом.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"перенаправления" — кавычки не кириллические

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

у нас в этой статье (и в многих других), увы, используются эти

#### **`redirect-rule`**
По сути, это тот же `$redirect`, поскольку у него тоже есть свойства "перенаправления" и логика у них практически аналогичная. Разница в том, что `$redirect-rule` применяется только в случае, если целевой запрос заблокирован другим базовым правилом.

> Отмена `$redirect-rule` работает точно так же, как для обычных правил `$redirect`. Даже более того, `@@|||example.org^$redirect` будет отрицать как правило `$redirect`, так и `$redirect-rule`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

осталось отрицать: "...будет отрицать как..."

@vbagirov vbagirov removed the request for review from slavaleleka May 12, 2021 09:38
@el-termikael el-termikael merged commit 377fefd into master May 12, 2021
@vbagirov vbagirov deleted the GH-815-redirect-rule-modifier branch May 12, 2021 09:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add $redirect-rule modifier description
4 participants