m-saqibali
10/21/2017 - 2:39 PM

Protect wp.congfig file

=============== .htaccess notes ===============

If your site does not have an .htaccess file, there is a blank copy included with the exercise files. The blank .htaccess file is contained in a zip file named:

blank.htaccess.zip

Note that, on most systems, .htaccess files are hidden by default, so you will need to enable "display of hidden files" to see it.

For more information, check out this post at WP-Mix:

https://wp-mix.com/create-htaccess-files-osx-windows/

# PROTECT WP-CONFIG
<Files wp-config.php>
	
	# Apache < 2.3
	<IfModule !mod_authz_core.c>
		Order allow,deny
		Deny from all
		Satisfy All
	</IfModule>
	
	# Apache >= 2.3
	<IfModule mod_authz_core.c>
		Require all denied
	</IfModule>
	
</Files>