CodeIgniter Forums
CI4 always returning 404 error page - 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: CI4 always returning 404 error page (/showthread.php?tid=78532)



CI4 always returning 404 error page - DanielTheGeek - 02-04-2021

I've spent a little while working on CI4 on Ubuntu and had to port the app to a different server that runs on Windows 10 OS, after setting up the hosts file and vhosts file I am left with a 404 error page when I run the app in the browser even though the router points to a controller that exists. Please what am I missing here?

Here is the 404 error I get:
   

Other relevant screens:
   
   
   


RE: CI4 always returning 404 error page - InsiteFX - 02-04-2021

1) On Windows 10 you need to define the host name in it's host file.

Code:
C:\Windows\System32\drivers\etc\hosts

2) You then need to edit the file with Notepad ( Administrator Access ) and add a server.

Code:
127.0.0.1    servername.local

I' have never tried use a com extension so not sure if your sever name will work but try it.

Nothing else in Windows can be using that ip address or you will need to change it.