A quick tutorial for those who want to hide the admin panel in a good way so it cannot be accessed via URL.
Open your admin file and add the following code after include [color=rgb(147, 101, 184)]backend/functions.php[/color]
Open your admin file and add the following code after include [color=rgb(147, 101, 184)]backend/functions.php[/color]
/**
* Hide admin panel from exploits with 404 header.
*
* @package hide_admin_panel_1.0
* @license GPLv3
* @author Shadows
* @version 1.0
*/
// Change 'class', to the minimal user class number that are not allowed to visit
if (!$CURUSER || $CURUSER['class'] < 4)
{
header('HTTP/1.1 404 Not Found');
// include_once 'your_404_custom_file.php'; // Include your 404 custom file if you use a custom error handlers.
exit;
}
else
{
header('HTTP/1.1 200 OK');
}