Skip to content

Instantly share code, notes, and snippets.

@thierrypigot
Created December 16, 2015 10:04
Show Gist options
  • Save thierrypigot/58a9f4c4940029bb243b to your computer and use it in GitHub Desktop.
Save thierrypigot/58a9f4c4940029bb243b to your computer and use it in GitHub Desktop.
Limiter l'accès à wp-admin ou wp-login.php à certaines IP
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^255\.255\.255\.255$
RewriteRule ^(.*)$ - [R=403,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment