#08 Removing public and index.php from URL | CodeIgniter 4 Tutorials
HTML-код
- Опубликовано: 4 дек 2024
- Step 1: Open App.php File from the Location: c:/xampp/htdocs/ci4/app/Config/App.php
public $baseURL = 'localhost:8080'; To
public $baseURL = 'localhost/your_project_name/';
Step2:
public $uriProtocol = 'REQUEST_URI'; To public $uriProtocol = 'PATH_INFO';
Step3:
In public/ directory, copy index.php and .htaccess to your root project directory.
Step4: Open index.php from project root directory, and edit the following path:
$pathsPath = FCPATH . '../app/Config/Paths.php'; To
$pathsPath = FCPATH . 'app/Config/Paths.php';