![]() |
Renaming index.php problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Renaming index.php problem (/showthread.php?tid=85840) |
Renaming index.php problem - dgvirtual - 12-10-2022 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: * -------------------------------------------------------------------------- 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 46Well, 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? RE: Renaming index.php problem - kenjis - 12-10-2022 It might be a bug, but we won't fix it. Your fix is no problem, because the file is used only when you use `spark serve`. If you don't want it, please use Apache or Nginx instead of `spark serve`. |