CodeIgniter Laravel PHP Example Javascript jQuery MORE Videos New

How to remove the public folder path from URL in CodeIgniter 4


To remove the public folder path from the URL you need to follow the below step:

Step 1:

Go to the app folder the config folder the open app.php Then change the base URL.

public $baseURL = 'http://localhost:8080/';

To

public $baseURL = 'http://localhost/your project folder name/';

Step 2:

Then copy the index.php and .htaccess from public to your app root folder.

Step 3:

Then open the index.php and change the

$pathsConfig = FCPATH . '../app/Config/Paths.php';

To

$pathsConfig = FCPATH . 'app/Config/Paths.php';