jebu1104
2/19/2015 - 6:43 PM

Example .htaccess this also has something that does not allow wp-config to be accessed.

Example .htaccess this also has something that does not allow wp-config to be accessed.


# 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


php_value post_max_size 120M
php_value upload_max_filesize 120M
php_value max_execution_time 600
php_value memory_limit 256M
php_value max_input_vars 200000

# Deny access to wp-config.php file
<files wp-config.php>
order allow,deny
deny from all
</files>

# Block the include-only files
<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>

# Deny access to all .htaccess files
<files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</files>

# Disable directory browsing
Options All -Indexes