Welcome Guest, Not a member yet? Register   Sign In
Why is there a index.php in my routing?
#1
Question 

Hi all,
I am new to CI for like half a year and working on my second project using it. I wonder about one thing:
My "normal" routing works well, domain.tld/page1 etc, Apache is set up to drop the index.php
But when I use something like
PHP Code:
return redirect()->route('page1'
the redirects are always going to index.php/page1
Why is that (and how to prevent it)?
Reply
#2

(This post was last modified: 08-28-2023, 07:49 PM by kenjis.)

If you don't want to include index.php in your site URIs, set $indexPage to '' in the app/Config/App.php file.
The setting will be used when the framework generates your site URIs.
Reply
#3

Ah, this is what I forgot... Thank you!
Reply
#4

I sent a PR to improve the user guide:
https://github.com/codeigniter4/CodeIgniter4/pull/7873

Can someone review it?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB