codeigniter routes with parameters

Today, We want to share with you codeigniter routes optional parameter.In this post we will show you codeigniter route optional parameter, hear for codeigniter 4 routes we will give you demo and example for implement.In this post, we will learn about Codeigniter 3 Get All Routes Using Controller with an example.

Codeigniter controllers subfolders

Codeigniter controllers subfolders Example

defined('BASEPATH') OR exit('No direct script access allowed'); 

class Login extends CI_Controller { 	 	

	public function index()



nice clean URL of:

Also Read This πŸ‘‰   PHP Create PDF file using mpdf | tcpdf | fpdf | php html to pdf

// sub directories


Free Live Chat for Any Issue

Understand your route


$route['account/manage/(:num)/(:any)']  = "account/manage/index/$1/$2";

manage.php controller

class Manage extends CI_Controller {
    public function index($id, $membername)
        // do something here with the two values

I hope you get an idea about dynamic routing in codeigniter.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.