Aegisify company logo

We're Here to Help

Resources & Help Center

Search our knowledge base, view documentation, or get support. Everything you need in one place.

How do custom WAF rules match paths using * and ? wildcards?

Custom rules let you write your own firewall logic for a specific part of your site. Every rule starts with a path pattern that decides which requests it applies to. Custom rules are managed in Aegisify WAF → WAF Settings → Custom Rules.

How matching works

  • No wildcard: the path must match exactly (case-insensitive). /wp-login.php matches only that file.
  • *** (asterisk)**: matches any sequence of characters, including slashes. /wp-json/myplugin/* matches every route under that namespace.
  • ? (question mark): matches exactly one character that is not a slash. /api/v?/status matches /api/v1/status and /api/v2/status.

If you omit the leading slash, the WAF adds it for you. Patterns match the request path, not the domain or query string.

Examples

  • /xmlrpc.php (exact file)
  • /wp-json/wc/v3/orders* (WooCommerce order endpoints and anything after them)
  • /checkout/* (all checkout sub-paths)

Scope it as narrowly as possible

A broad pattern such as /* applies the rule to every page, REST call, and admin request. That can create false positives or, for exclusion rules, large blind spots. For safety, Skip Core WAF inspection rules must name a bounded application path; global or root wildcards are rejected for that action.

Order and priority

Rules are evaluated by numeric priority (lower runs first), and the first matching rule is selected. New rules default to spaced numbers such as 100, 110, 120 so you can insert another rule between them later.

Related: Rule methods, Contains (all) matching, Regex conditions, Rule actions.

2026-12-01T03:50:54+00:00January 12th, 2026||

Find this article interesting, please share.