Last active
April 3, 2025 20:15
-
-
Save geigel/804d7005dd587c6bd4fa565c41cc3f62 to your computer and use it in GitHub Desktop.
Regular expression (regex) matching every page in a Wordpress site except for the homepage and pages related to the admin section (e.g. those under wp-admin/). Useful when redirecting to the homepage of a dead site that needs to still exist, but force all incoming traffic to the homepage to see some message.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(?!\/(wp-admin\/|wp-login\.php|wp-register\.php)(\?|$)).+$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment