skip to Main Content

Im trying to combine several tutorials about Codeigniter and bootstrap and understand per codes so i can integrate it in my project. What i am trying to do right now is create a login form using the two framework.

And i setup my View according to the turotial included in Codeigniter ‘user_guide/tutorial/static_pages.html’ which my landing page is named as ‘home.php’ is inside the folder ‘pages’ and header.php, and footer.php is inside the ‘templates’ folder. I created also a controller: Page.php.

I also use .htaccess to hide ‘index.php’. Now i follow this tutorial how to create a login page:

-the only difference is this since i use htaccess:

<?php echo form_open(clogin/index); ?>

But when I try to submit the page i receive a: 404 page not found.
My navbar links are working fine. I understand that the codeigniter works like this:


so when i submit my form the url that show up is:


and gives me: 404 page not found.

What is wrong with it?
is there something wrong with the tutorial that i am using? i check other tutorials and the controller structure is just the same, like on this link:

do i need to include clogin.php in route.php?
or is it about the htaccess? my


is configured as


in config.php. i tried other options but still the same.



  1. Chosen as BEST ANSWER

    i already firgured it out.The mistake was in the route.php, since i tried to combine two examples.. i realized that the wildcard route that i included from the Codeigniter user guide will not work with the Clogin.php.

    Since it was set as


    So the url works as


    instead of


    I removed it and now it is working.

  2. Don’t need include to route.
    I recommented ready auth library.
    If you use DevTools in your browser maybe “Network” tab of devtools can help you to why you get 404 error.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top