Skip to content

Instantly share code, notes, and snippets.

@simaovergalho
Created July 16, 2015 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save simaovergalho/05eb0d5e0454a6cc4371 to your computer and use it in GitHub Desktop.
Save simaovergalho/05eb0d5e0454a6cc4371 to your computer and use it in GitHub Desktop.
Add index.php with this to folder to prevent direct folder access or to file to prevent direct file access.
if( ! defined('ABSPATH') ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit;
}
//OR
if ( !defined('ABSPATH') ) { die('-1'); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment