Judging by the title, first of all check if PHP is running on your server using CGI/FastCGI or not (you can just check that phpinfo() ).
If so, change the following in config.php :
$config['uri_protocol'] = "REQUEST_URI";
Back to the topic, you can achieve this using the single-line route below in your routes.php file:
$route['support/(?!index)(?!delete)(:any)'] = "support/viewticket/$1";
And remove these lines from your __construct method:
$urlarray = array("index","delete"); if(!in_array($this->uri->segment(2),$urlarray)){ $this->viewticket($this->uri->segment(2)); }
Let me know how it works.
source share