Admin panel path change XF v2.1.2

heroesbtc

Well-Known Member
Registered
Dec 17, 2017
77
2
localhost
Credits
9
Hi Is there a way to rename the path of admin.php to something else or is there add-ons ?

In order to protect the site from brute force
 

PSYCHO_

Active Black Hat Cypher
Registered
Trusted Uploader
Jan 18, 2019
3,824
849
Credits
23,241
Just add the following to your src/config.php file:

Code:
$c['router.admin.formatter'] = $c->wrap(function($route, $queryString)
{
   $suffix = $route . (strlen($queryString) ? '&' . $queryString : '');
   return strlen($suffix) ? 'not_admin.php?' . $suffix : 'not_admin.php';
});
Replace not_admin.php with whichever name you have renamed admin.php to.
 
  • Like
Reactions: mamaguana

Similar threads