Skip to main content

URL pattern syntax

Patterns are app-relative paths. Matching is case-insensitive and ignores trailing slashes.

PatternMatchesDoes not match
/admin/posts/admin/posts, /admin/posts//admin/posts/1
/admin/posts/{id}/admin/posts/7/admin/posts/7/edit
/admin/posts/{id}/edit/admin/posts/7/edit/admin/posts/edit
/admin/posts/*/admin/posts/7, /admin/posts/7/edit/admin/posts
*everything-

Writing rules in the panel​

Write one rule per line: [METHODS] /path.

GET /admin/posts
GET,POST /admin/posts/{id}/edit
/admin/reports/* <- any method
GET,POST:/admin/legacy <- Laravel style also accepted
  • To grant a whole area, use two rules: /admin/posts and /admin/posts/*.
  • HEAD requests match GET rules.
Avoid a star without a slash

Avoid /admin/posts* (no slash). It also matches /admin/postsecret.

Test a rule​

Use Permissions → URL tester to see which rules match a request and whether a given user is allowed.

URL tester