I run into a problem of renaming index.php to api.php, for though the app/Config.php file comment suggests that it can be renamed
PHP Code:
* --------------------------------------------------------------------------
* Index File
* --------------------------------------------------------------------------
*
* Typically this will be your index.php file, unless you've renamed it to
* something else. If you are using mod_rewrite to remove the page set this
* variable so that it is blank.
*
* @var string
*/
public $indexPage = 'index.php';
, changing the $indexPave variable to api.php and renaming the index.php file actually resulted in an error:
Quote:Warning: require_once(/home/myuser/dev/mywebsite/backend/public/index.php): failed to open stream: No such file or directory in /home/myuser/dev/mywebsite/backend/vendor/codeigniter4/framework/system/Commands/Server/rewrite.php on line 46
Fatal error: require_once(): Failed opening required '/home/myuser/dev/mywebsite/backend/public/index.php' (include_path='.:/opt/lampp/lib/php') in /home/myuser/dev/mywebsite/backend/vendor/codeigniter4/framework/system/Commands/Server/rewrite.php on line 46
Well, to fix it I had to modify the
system/Commands/Server/rewrite.php file by replacing the two occurences of index.php there with api.php; it works now, but changin CI core files is the wrong way to do things...
Should I consider the fact that index.php is hardcoded a bug and report it? Or am I missing some setting?
==
Donatas G.