Different URL call from Codeigniter Controller

Asked

Viewed 293 times

1

I wonder if there is any simple way to make the URL different to the controller name in Codeigniter.

Knowing that codeigniter works as follows: www.meusite.com/CONTROLLER/FUNCTION

For example: Calling www.meusite.com/Product/List url I don’t want my controller to be named "Product" but "Productocontroller". But you don’t want the URL to be www.meusite.com/Productocontroller/Listar

  • 1

    can do this with routes, http://www.codeigniter.com/user_guide/general/routing.html

  • 1

    Vlw.. That’s exactly what I wanted.

1 answer

0

Route in config/Routes.php

$route['produto/listar'] = "ProdutoController/Listar";

Browser other questions tagged

You are not signed in. Login or sign up in order to post.