How do I hide the Controller name in the url?

1

I would like to know how to hide the driver name in Codeigniter.

Knowing that the codeigniter works as follows:

www.meusite.com/CONTROLADOR/FUNÇÃO

Ex: www.meusite.com/dashboard/login I want you to www.meusite.com/login

Thank you in advance!

    
asked by anonymous 12.12.2017 / 02:27

1 answer

4

You can use the routes In the application / config / routes.php

It has an array called '$ route' where you can define your routes

$route['product/:num'] = 'catalog/product_lookup'; 

In your case, I think it would be

$route['login'] = 'dashboard/login';
    
12.12.2017 / 12:25