What do the Force Merge and Keep Original Rules options do?
Short answer
Both are options of the Merge operation in the Merge WAF Rules window, unchecked by default. Force Merge allows merging even if the Merge Path does not cover all the paths of the selected rules; while it is unchecked, if there is a path that does not match the pattern, the N path(s) do not match the merge pattern question appears after Accept, and answering Yes gives the same result as Force merge. The settings of a path included by force are carried to the merged rule, but since its path does not match the pattern, that path does not match the merged rule; if its original rule has been deleted, it falls to another matching glob rule or to Any Paths. Keep Original Rules creates the merged rule in addition, without deleting the selected rules; exact rules continue to cover their own paths by priority, and the merged glob rule catches the paths that have no exact counterpart and completes the Check Fields sections that the exact rules do not define (runtime effect). If the result is unexpected, the previous state is restored by deleting only the merged rule.
How Does It Work?
| Force merge | Keep Original Rules | |
|---|---|---|
| Default | Unchecked | Unchecked |
| What it does | Merges despite the paths that do not match the pattern | Leaves the selected rules in the list; the merged rule is created in addition |
| While unchecked | If there is a non-matching path, confirmation is asked: Yes forces it, No returns to the window | The selected rules are deleted, and the merged rule takes their place |
| Runtime result | Non-matching paths do not match the merged rule | Exact rules have priority on their own paths; the merged glob rule covers only the paths that have no exact counterpart |
| When | When the merge path is deliberately written narrower or differently | When the effect of the merge is to be tried while the original rules are preserved |
- When the merge path is an exact value, since two different paths cannot both match it exactly, the merge is done only with Force merge (or with Yes in the confirmation question); the merged rule covers only that path.
- If the merge path is the same as the path of a rule other than the merged rules, Force merge does not get past this; the operation is rejected with the Rule collision error.
- With Keep Original Rules, the merged glob rule does not change the path settings on the exact paths it matches; the path settings come from the exact rule (If a request matches more than one page type, how are the rules applied (exact path priority, glob rules merged with Any Paths)?).
- Merge steps: How do I merge several page types into one rule (Merge)?
Common Misconceptions
- "Force merge also adds the non-matching paths to the pattern." The pattern does not change; the non-matching paths do not come within the scope of the merged rule.
- "With Keep original rules, the merged rule has no function." The merged glob rule catches the paths that have no exact counterpart and completes the Check fields sections that the exact rules do not define.
- "While Keep original rules is unchecked, there is a way back." The selected rules are deleted; for a way back, Export is taken before the merge.
How it is done in the documentation
