DEV Community

Cover image for How to remove [public/index.php] URL in Codeigniter 4 - Step By Step
Robert Look
Robert Look

Posted on

How to remove [public/index.php] URL in Codeigniter 4 - Step By Step

Today in this tutorial, If you want to remove public and index.php from URL in Codeigniter 4 framework. So this tutorial will help you how to remove index.php in Codeigniter 4.

In this tutorial, we would love to share with you, index.php remove in Codeigniter 4, how to remove public and index.php from URLs in the new Codeigniter 4 frameworks.

The directory structure of the New Codeigniter 4 framework has been changed how to remove index.php from Codeigniter 4.

public $baseURL = 'http://localhost:8080';
To
public $baseURL = 'http://localhost/your_project_name/';
**Or**

$pathsPath = FCPATH . '../app/Config/Paths.php';
 change TO
 $pathsPath = FCPATH . 'app/Config/Paths.php';
Enter fullscreen mode Exit fullscreen mode

How to remove [public/index.php] URL in Codeigniter 4 - Step By Step

Top comments (0)