In my Application
I have 3 routing rules (defined in routes.php
file) thats directed to the one controller
$route[urlencode('news')] = "news/show-news";
$route[urlencode('letters')] = "news/show-news";
$route[urlencode('papers')] = "news/show-news";
so
if any user navigate to any of those URLs
http://example.com/news/
http://example.com/letters/
http://example.com/papers/
The target controller will be news/show-news
My need
How to identify Routing rule that used that directed to my Codeigniter controller?
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class News extends CI_Controller {
public function show-news(){
// came from [news OR letters OR papers] ??
}
}