how to change or lock admin.php

E

es-xenforo.com

Guest
how to lock or change admin.php to anyone without admin in xenforo 2.1 ?
Just add the following to your src/config.php file:
PHP:
$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.
 
Top