Hilangkan index.php dari URL; redirect / ke admin/login

This commit is contained in:
BIJ Dev
2026-04-22 00:17:43 +07:00
parent fa38ac6b24
commit fa66521cce
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ class App extends BaseConfig
* something else. If you have configured your web server to remove this file
* from your site URIs, set this variable to an empty string.
*/
public string $indexPage = 'index.php';
public string $indexPage = '';
/**
* --------------------------------------------------------------------------

View File

@@ -5,7 +5,7 @@ use CodeIgniter\Router\RouteCollection;
/**
* @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->get('login', 'Auth::login');