Skip to content

Instantly share code, notes, and snippets.

@deviationist
Created March 4, 2023 16:35
Show Gist options
  • Save deviationist/aba1272110948574bf712d6e36340abd to your computer and use it in GitHub Desktop.
Save deviationist/aba1272110948574bf712d6e36340abd to your computer and use it in GitHub Desktop.
Regex to match all but native WordPress URL's - useful when wanting to redirect all traffic, except on WordPress-related URLs
^(?!\/(wp-admin|wp-content|wp-includes|wp-json|wp-login.php)).*$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment