CodeIgniter Forums
index.php automatically being added to links? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: index.php automatically being added to links? (/showthread.php?tid=75944)



index.php automatically being added to links? - dudeawesome - 03-31-2020

Hi

This is my first experience with CI4 after being comfortable with 3. As with any fresh CI installation I've spent the last chunk of time removing index.php from the URLs (do people use this? why is it enabled by default?). 

I've got to the point where it is almost done - i.e. if i navigate to mysite.com/controller, everything functions as expected. However if I link to /controller/ on my page, when clicking it always redirets to index.php/controller. 

Now from my setting up this still brings back the correct page but it's a horrendous looking URL. Does anybody know where the settings/ how I can remove index.php from being automatically set on my URLs? The link itself still claims to go to /controller/ so I'm assuming there's some kind of routing there automatically redirects there or something? I'm not a fan so any help would be appreciated

thanks


RE: index.php automatically being added to links? - InsiteFX - 03-31-2020

CodeIgniter Remove index.php By .htaccess


RE: index.php automatically being added to links? - dudeawesome - 03-31-2020

(03-31-2020, 08:36 AM)InsiteFX Wrote: CodeIgniter Remove index.php By .htaccess

Well, I'm an idiot. Had already done the .htaccess tips but looks like it was some kind of caching issue, as a friend and incognito mode did not produce the same problem.

Thank you for replying anyway!