
# ==================================
# BLOQUEAR XML-RPC (FUERZA BRUTA)
# ==================================
<Files xmlrpc.php>
    Require all denied
</Files>

# ==================================
# PROTEGER WP-LOGIN (solo POST)
# ==================================
<Files wp-login.php>
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} !POST
        RewriteRule .* - [F]
    </IfModule>
</Files>

# ==================================
# BLOQUEAR EJECUCIÓN EN UPLOADS
# (CLAVE CONTRA MALWARE)
# ==================================
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^wp-content/uploads/.*\.(php|php7|phtml|phar|cgi|pl|py|sh)$ - [F,L]
</IfModule>

# Extra: bloquear acceso directo a scripts ocultos
<FilesMatch "^\.">
    Require all denied
</FilesMatch>

# ==================================
# BLOQUEAR WP-CRON (solo servidor)
# ==================================
<Files wp-cron.php>
    Order allow,deny
    Deny from all
    Allow from 127.0.0.1
</Files>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
