[CI]URL parameter in Codeigniter separated by slashes
Posted: Wed Jun 11, 2014 2:54 am
In my project, I am passing parameters through URL like,
http://site.org/project/controllername/ ... &type=free
What I want is to change the URL to
http://site.org/project/controllername/function/1/free
Is there any method to do this in Codeigniter without using htaccess. I tried adding
in application/config/routes.php file. But it returned
Can anyone help me to achieve this. Thanks in advance.
http://site.org/project/controllername/ ... &type=free
What I want is to change the URL to
http://site.org/project/controllername/function/1/free
Is there any method to do this in Codeigniter without using htaccess. I tried adding
Code: Select all
$route['(:any)'] = 'controllername/function/$1';Error.404 (Page Not Found)
Can anyone help me to achieve this. Thanks in advance.