Welcome Guest, Not a member yet? Register   Sign In
Url functions includes index.php in CI 4.2.1
#1

(This post was last modified: 08-03-2022, 11:31 PM by jetspeed.)

Hi guys,

I noticed another thing with the update from CI 4.1.9 to 4.2.1.

Functions which return a URL (e.g. anchor(), current_url()) will result in the url being appended with index.php.

For example:

PHP Code:
echo anchor('subdir''link'); 

Will produce

PHP Code:
<a href="https://mysite.url/public/index.php/subdir">link</a

Is there any setting to remove index.php from the url? This behaviour was not there in CI 4.1.9.
Reply
#2

The URL functions that deal with project URLs (I.e. URLs to your own routes) use your app.baseURL and app.indexPage settings. Check Config\App to make sure you have those set how you want them.
Reply
#3

(08-04-2022, 03:18 AM)MGatner Wrote: The URL functions that deal with project URLs (I.e. URLs to your own routes) use your app.baseURL and app.indexPage settings. Check Config\App to make sure you have those set how you want them.
Thanks for pointing that out. I re-checked my Config\App, and found I stupidly overwrote it without merging the changes.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB