Hilangkan index.php dari URL; redirect / ke admin/login
This commit is contained in:
@@ -40,7 +40,7 @@ class App extends BaseConfig
|
|||||||
* something else. If you have configured your web server to remove this file
|
* something else. If you have configured your web server to remove this file
|
||||||
* from your site URIs, set this variable to an empty string.
|
* from your site URIs, set this variable to an empty string.
|
||||||
*/
|
*/
|
||||||
public string $indexPage = 'index.php';
|
public string $indexPage = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* --------------------------------------------------------------------------
|
* --------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use CodeIgniter\Router\RouteCollection;
|
|||||||
/**
|
/**
|
||||||
* @var RouteCollection $routes
|
* @var RouteCollection $routes
|
||||||
*/
|
*/
|
||||||
$routes->get('/', 'Home::index');
|
$routes->get('/', static fn () => redirect()->to('admin/login'));
|
||||||
|
|
||||||
$routes->group('admin', ['namespace' => 'App\Controllers\Admin'], static function ($routes) {
|
$routes->group('admin', ['namespace' => 'App\Controllers\Admin'], static function ($routes) {
|
||||||
$routes->get('login', 'Auth::login');
|
$routes->get('login', 'Auth::login');
|
||||||
|
|||||||
Reference in New Issue
Block a user