First you need to create a new folder directory inside root folder and create index.php where you need to create cookie.
$mysecurecookie="123456";
setcookie("admincookie",$mysecurecookie,0,"/");
header("Location: /administrator/index.php");
Now Place the below code inside htaccess file of admin panel
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/administrator
RewriteCond %{HTTP_COOKIE} !admincookie=123456
RewriteRule .* - [L,F]
So now if any user try to login using joomla admin url he will not get succeed as joomla admin url will be unable to access unless if someone knows the exact secret folder url.So by this way we will prevent unauthorized users to access the administrator url.
0 Comment(s)