Is this a bug or design choice? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Is this a bug or design choice? (/showthread.php?tid=78399) |
Is this a bug or design choice? - MrWhite - 01-13-2021 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. RE: Is this a bug or design choice? - MrWhite - 01-15-2021 Any idea about this guys? RE: Is this a bug or design choice? - demyr - 01-15-2021 It is a design choice in my opinion because there is an official guide about how to remove index.php in the url. RE: Is this a bug or design choice? - includebeer - 01-15-2021 (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. RE: Is this a bug or design choice? - MrWhite - 01-15-2021 (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. Yeah! I agree with you. this is probably a bug. RE: Is this a bug or design choice? - demyr - 01-16-2021 Do you see the index.php when you check the url with site_url ? Could you also check here please. site_url RE: Is this a bug or design choice? - MrWhite - 01-16-2021 (01-16-2021, 01:02 AM)demyr Wrote: Do you see the index.php when you check the url with site_url ? I'm not talking about site_url(). I'm talking about current_url(). RE: Is this a bug or design choice? - demyr - 01-16-2021 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. |