This is my CodeIgniter Controller class code.
class View extends MY_Controller
{
function index($number)
{
.....
}
.......
}
Through browser, I can access the View class’s index method using this URL
http://localhost/view/index/12
So, my question is
is there any efficient way to rewrite the URL, for example, into this URL
http://localhost/view/12
My web server is Nginx.
index()is called by default , but if you want to do it for other functions , you can make use of URI Routing feature in CI.Add this to routes.php in config directory.