Created
October 11, 2022 13:59
-
-
Save metelidrissi/307a480d1d667de47eada8f4aa65f9b1 to your computer and use it in GitHub Desktop.
Allow access to wp-admin only to certain IPs - En la raíz de WordPress
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
# BEGIN WordPress | |
# Las directivas (líneas) entre «BEGIN WordPress» y «END WordPress» son | |
# generadas dinámicamente y solo deberían ser modificadas mediante filtros de WordPress. | |
# Cualquier cambio en las directivas que hay entre esos marcadores serán sobrescritas. | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress | |
# BEGIN DS-XML-RPC-API | |
# Las directivas (líneas) entre «BEGIN DS-XML-RPC-API» y «END DS-XML-RPC-API» son | |
# generadas dinámicamente y solo deberían ser modificadas mediante filtros de WordPress. | |
# Cualquier cambio en las directivas que hay entre esos marcadores serán sobrescritas. | |
<Files xmlrpc.php> | |
order deny,allow | |
deny from all | |
</Files> | |
# END DS-XML-RPC-API | |
#Allow access to wp-login.php | |
<Files wp-login.php> | |
order deny,allow | |
deny from all | |
allow from 12.34.56.76 | |
allow from 891.121.13.14 | |
</Files> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment