Last active
May 18, 2026 16:36
-
-
Save bhwebworks/80c3d6ce06bba53bfa0ef700c2e01bb4 to your computer and use it in GitHub Desktop.
Add this to .htaccess to block access to the WordPress default registration form unless referred from a specific page
This file contains hidden or 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
| #Block spam registrations (wp-login.php?action=register) | |
| # Why? Server overloads and bounced emails | |
| RewriteEngine On | |
| #RewriteCond %{HTTP_REFERER} !^https://settigang.com/portal-access/?ld_register_id=580.*$ [NC] | |
| RewriteCond %{HTTP_REFERER} !^https://settigang.com/portal-access/.*$ [NC] | |
| RewriteCond %{THE_REQUEST} ^.*(wp-login.php\?action=register).* [NC] | |
| RewriteRule ^(.*)$ - [F,L] |
Author
Thank you for sharing this! Appreciated!
You are welcome!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for sharing this! Appreciated!