Created
October 2, 2021 19:45
-
-
Save shirokoweb/9e28b45668b780bea0f0ccf64aff3ef8 to your computer and use it in GitHub Desktop.
Resttrict wp-login to IP address
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ | |
RewriteCond %{REMOTE_ADDR} !^10\.110\.20\.220$ | |
RewriteCond %{REMOTE_ADDR} !^20\.220\.30\.330$ | |
RewriteRule ^(.*)$ - [R=403,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment