When I create a controller in CodeIgniter, for example, "login.php". I create a public index function in it and load the login_form function into the function, CodeIgniter generates a url localhost/test/login.
Now, if I create another function "register" in the same controller, url will be localhost/test/login/register, but I want to create url as localhost/test/register. Do I need to create a new controller register and make an index function in it, or can the same URL be generated by adding a function to the input controller. What is the “normal” way to do this? Thank.
source
share