Skip to content

Gate dynamic URLs with regex

For patterned URLs that change — forum boards, numbered levels, dated paths — match them all with one regular expression.

  • Regex pattern
  • Matches dynamic paths
  • One rule, many URLs
No credit card required
FreeRestrict & gate

Some sections have dynamic, patterned URLs/forum/board-12/, /courses/level-3 — that a prefix can’t target precisely. A Regex URL rule matches them all with one regular expression, gating a whole family of paths while leaving public ones (announcements, rules) open. This recipe gates by regex.

What you get
  • One regex covers a whole family of dynamic URLs.
  • Public paths stay open; patterned ones are gated.
  • Send non-members to login or pricing.
  • Precise control over complex URL structures.
Copy these settings

The exact configuration

Enter these values and you have the setup live. Every field maps to a real ArraySubs setting.

SettingValue
Pattern TypeMember Access → URLRegex
URL PatternRule targete.g. ^/forum/board-[0-9]+/
ActionRule actionLogin (or Redirect / Message / 403)
IF conditionRule conditionsHas Active Subscription
Best for

When to use this setup

Forums with numbered boards
Courses with leveled URLs
Any patterned, dynamic path
Set up

Set it up in 3 steps

A step-by-step guide drawn from the ArraySubs user manual. Open the linked page for the full walkthrough and screenshots.

  1. Add a URL rule with Regex

    In Member Access → URL, add a rule and set Pattern Type = Regex.

    Access Rules
  2. Write the pattern

    Enter a regex such as ^/forum/board-[0-9]+/ to match all numbered boards.

    Access Rules
  3. Set action and priority

    Choose an action (e.g. Login) and a Priority so this rule evaluates before broader ones.

    Content Restriction
From the manual

This recipe is built from these ArraySubs user-manual guides:

Good to know

Notes & edge cases

Regex matches the URL path only (no query strings).
Test patterns carefully — an over-broad regex can gate more than intended.
Lower Priority numbers run first; the first failing rule applies.
Built with

Modules behind this recipe

The ArraySubs modules this setup relies on.

Free + Pro

Member Access

Control who can see, download, and purchase content using flexible rules tied to subscriptions and roles.

Free + Pro

Subscription Products

Create and manage simple or variable subscription products with trials, signup fees, plan logic, and lifecycle behavior.

FAQ

Questions, answered

Standard PHP/PCRE-style patterns against the URL path, e.g. ^/courses/level-[0-9]+$ to match numbered levels.

Yes — either craft the regex to exclude them, or add a higher-priority allow path; announcements and rules can stay open.
Paid Pro plans

Unlock the complete Pro stack

Start on the free-forever core today, then choose a paid Pro plan when you need the advanced Pro feature set.

No credit card required · Annual and lifetime options available