Routing is a technique used in CodeIgniter, by which you can define your URLs BASED on the REQUIREMENTINSTEAD of using the predefined URLs. So, WHENEVER there is a request made and MATCHES the URL pattern defined by us, it will automatically direct to the specified controller and function.
A URL string and its corresponding controller class or method are in a one-to-one relationship here. The URI segments usually follow this pattern: example.com/class/function/id/. All routing rules are defined in the application/config/routes.php file of CodeIgniter.