Codeigniter

How to remove public/index.php/ from URL in Codeigniter 4

Pinterest LinkedIn Tumblr

Step 1: First you need to go inside of the public folder and copy index.php and .htaccess file then replace to root directory index.php and .htaccess.

Step 2: Change the path inside of index.php

Find $pathPath and replace inside of index.php

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

change to

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

Write A Comment

Open chat
Hey Visitor,

How can I help you?