Skip to content

Hiding php extension in requests #814

Answered by datamweb
gl2007 asked this question in Q&A
Discussion options

You must be logged in to vote

So it can be domain.com/index/login

The domain.com/index/login causes problems, because index is recognized as a controller and the login method. It is better to do the following to remove it altogether.

Try set as follows in app/Config/App.php:

-public string $indexPage = 'index.php';
+public string $indexPage = '';

https://github.com/codeigniter4/CodeIgniter4/blob/127ce6b7a0ff7e0d9050837c031fb417741f1eb3/app/Config/App.php#L44

Probably, if you raise the issue in the forum, they will be able to help

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@gl2007
Comment options

@datamweb
Comment options

@gl2007
Comment options

@datamweb
Comment options

Answer selected by gl2007
@gl2007
Comment options

@kenjis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants