URL structure

URI segments

The segments in the URL usually represent:

  1. The first segment represents the controller class that should be called.
  2. The second segment represents the class method that should be called.
  3. The third, and any additional segments, represent the ID and any variables that will be passed to the controller.

The URI class contains functions that make it easy to work with your URI data.

If your controller is located in a folder or sub-folders, you may include it in he URL:


Query strings

You may also include query strings in the URL:


Removing the index.php file

By default, the index.php file may be included in your URLs:


You may easily remove it by editing "application/config.php" file and changing this code:

$config['index_page'] = 'index.php';

To this one:

$config['index_page'] = '';