Welcome Guest, Not a member yet? Register   Sign In
Is this a bug or design choice?
#1

versions: ci4 4.04 and ci4 4.x latest develop branch.

file: app/config/app.php
PHP Code:
public $indexPage 'index.php'

Url that I'm currently in:
Code:
http://localhost:8080/index.php/books/add

when I try to echo current_url() in the view file. its returns,

Code:
http://localhost:8080/books/add

See! there is no index.php part in the URL. 

I think this is a bug. this method should return url with the index.php part.

In CI3 this was the default behaviour.
Reply
#2

Any idea about this guys?
Reply
#3

It is a design choice in my opinion because there is an official guide about how to remove index.php in the url.
Reply
#4

(01-15-2021, 01:12 PM)demyr Wrote: It is a design choice in my opinion because there is an official guide about how to remove index.php in the url.

I hope not. If they give the option to use URL with and without index.php, it should work regardless which way you decide to use.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#5

(01-15-2021, 04:05 PM)includebeer Wrote:
(01-15-2021, 01:12 PM)demyr Wrote: It is a design choice in my opinion because there is an official guide about how to remove index.php in the url.

I hope not. If they give the option to use URL with and without index.php, it should work regardless which way you decide to use.

Yeah! I agree with you. this is probably a bug.
Reply
#6

Do you see the index.php when you check the url with site_url ?

Could you also check here please. site_url
Reply
#7

(01-16-2021, 01:02 AM)demyr Wrote: Do you see the index.php when you check the url with site_url ?

Could you also check here please. site_url

I'm not talking about site_url(). I'm talking about current_url().
Reply
#8

(This post was last modified: 01-16-2021, 03:17 AM by demyr.)

Thank you. I meant that they both have different purposes maybe ?? And so, it might be a design choice ?

Then, the only thing I can do for you is to provide you this link. So that you can inform it there.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB