![]() |
simple 404 not found - 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: simple 404 not found (/showthread.php?tid=79481) |
simple 404 not found - alexisgarci - 06-22-2021 Hi guys, i have used codeigniter before and i have never had this issue. Im sutck in a 404 not found and i dont know whats happening. Im on localhost using xamp.4.48 (Win64) OpenSSL/1.1.1k PHP/7.4.20 Server at localhost Port 804 Not Found The requested URL was not found on this server controller Code: <?php Code: ````<form method="post" action="teste" class="login_form" accept-charset="utf-8"> Code: RewriteEngine On Code: $config['index_page'] = 'onekey'; RE: simple 404 not found - berendbotje91 - 06-22-2021 Probably because you have configured xamp to start from /project-folder/public/ folder, and you are running it from /project-folder/. However, I suggest running it from commandline tool on development enviroments as suggested in the user guide: https://codeigniter.com/user_guide/installation/running.html RE: simple 404 not found - alexisgarci - 06-23-2021 So i changed <form method="post" action="teste" class="login_form" accept-charset="utf-8"> <button>Entrar</button></form> to <form method="post" action="index.php/onekey/do_login" class="login_form" accept-charset="utf-8"> and its working now, but its not like it shud be. Any tips on how to config it? I didnt do any configuration on xamp RE: simple 404 not found - berendbotje91 - 06-23-2021 (06-23-2021, 01:11 AM)alexisgarci Wrote: So i changed Read the user guide about installation and running the app: https://codeigniter.com/user_guide/installation/running.html If you want to run from an Apache Server (like XAMP) you need to configure it so it will run from the public folder inside the project folder. For example if your project folder is called MyCodeIgniter and is on the root of the C drive, you should configure XAMP to run from Code: C:\MyCodeIgniter\public\ However, probably most of us use the command line tool for development instead of XAMP/LAMP/WAMP. We start a server with Code: php spark serve Secondly, there is an helper in CI4 for using forms: https://codeigniter.com/user_guide/helpers/form_helper.html?highlight=form Something else that might make you more familiar with CI4 is following the tutorial here: https://codeigniter.com/user_guide/tutorial/index.html |