Codeigniter 4 Removing Index.Php From Url

Codeigniter 4 Removing Index.Php From Url

Today, we will learn how to remove index.php from URL in Codeigniter 4. why are you remove index.php from URL? because when users using create SEO friendly, user readability and easy to understand for the user.

Now, let’s start to discuss how to remove index.php from URL in Codeigniter 4. so you can follow the below step.

Step 1: Update in the App.php File
In this step, We need to change baseURL, indexPage and uriProtocol in the “config/app.php” file. so you can follow the below changes.

Step 2: Copy index.php and .htaccess files
The second step Copy the “index.php” and “.htaccess” files file in the public directory and paste on root your project directory.

Step 3: Update In the index.php
Finally, after move successfully files on the root directory. The open “index.php” file and change the pathsPath.

9 thoughts on “Codeigniter 4 Removing Index.Php From Url

  1. Fantastic goods from you, man. I have be mindful your stuff prior
    to and you’re just extremely wonderful. I actually like what you’ve
    received here, certainly like what you’re stating and the way in which in which you
    assert it. You’re making it entertaining and you continue to take care
    of to stay it sensible. I can not wait to learn much more from you.
    That is really a wonderful website.

  2. Amazing things here. I am very glad to look your
    article. Thank you so much and I’m taking a look
    ahead to contact you. Will you kindly drop me a mail?

  3. My brother suggested I might like this web site.
    He used to be entirely right. This put up truly made my day.
    You can not believe just how much time I had
    spent for this information! Thanks!

  4. I am not positive where you are getting your info, however good topic.

    I must spend a while studying much more or working out
    more. Thank you for great information I used to be in search of this information for my mission.

Leave a Reply

Your email address will not be published. Required fields are marked *