Created
September 21, 2016 04:47
-
-
Save malwador/0b251855e653db08f51a9ef1d7ba5c84 to your computer and use it in GitHub Desktop.
.htaccess seguro
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
# #BlogsNI - Taller sobre Wordpress Avanzado | |
# .htaccess seguro para proteger tu Wordpress | |
# | |
# Desactivamos el listado de archivos en directorio cuando no haya index.html o index.php | |
Options All -Indexes | |
# Bloqueamos el acceso directo al folder wp-includes | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^wp-admin/includes/ - [F,L] | |
RewriteRule !^wp-includes/ - [S=3] | |
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] | |
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] | |
RewriteRule ^wp-includes/theme-compat/ - [F,L] | |
</IfModule> | |
# Negamos el acceso al archivo wp-config.php que es donde se guarda la informacion de base de datos | |
<files wp-config.php> | |
order allow,deny | |
deny from all | |
</files> | |
# Negamos el acceso a los arhivos .htaccess | |
<files ~ "^.*\.([Hh][Tt][Aa])"> | |
order allow,deny | |
deny from all | |
satisfy all | |
</files> | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment