Last active
November 24, 2015 05:57
-
-
Save jasonhinkle/966aee379b170f365e6f to your computer and use it in GitHub Desktop.
Limit access to Wordpress admin interface to specific IP address
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
# LIMIT WORDPRESS ADMIN ACCESS TO A WHITELISTED IP ADDRESS | |
# REPLACE 255.255.255.255 WITH YOUR OWN IP | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin/.* | |
RewriteCond %{REQUEST_URI} !wp-admin/admin-ajax\.php$ | |
RewriteCond %{REMOTE_ADDR} !^255.255.255.255$ | |
RewriteRule ^(.*)$ - [R=403,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment