Jump to content
groovyPost Forums

How To Block Access to wp-config.php or .htaccess file


Steve

Recommended Posts

Just drop this code into your .htaccess file:

 

You could also just block everyone from accessing the wp-config file via browser with the following code in your .htaccess file:

 

# Block access to wp-config
order allow,deny
deny from all

 

Blocking access to your .htaccess file is also a good idea:

 

# Block access to htaccess

order allow,deny
deny from all

Link to comment
Share on other sites

  • 4 years later...

John here and I know I'm far behind in reference to reply, but as for the code for blocking accesses, is there any specific location you'd suggest I place this onto a predominately php script? I know it's not supposed to be within a php script but was curious to know if it matters if I place them either above or in the middle or below all of them?

 

Sorry but kinda new in making websites and prefer Dreamweaver over other web-making services that come with restrictions.

 

Thanks,

John

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 6 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...