Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^\/(?!\.well-known\/).*
/
mg

Description

Will match typical urls such as:

/
/somepage
/some/nested/page

Will not match URLs starting with

/.well-known/

Intended to allow auto-renewals of certs for domains that just redirect.

Submitted by anonymous - 3 years ago