CodeIgniter is an MVC framework. This means that you have a single entry point to the application which is index.php. It doesn't matter which URL you access. They all go through index.php. by default index.php is displayed in the url as shown in the following example

  •  We need to create the .htaccess that rewrites the URLs
  • Add a new file .htacces in the root directory of the application
  • Add the following code


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

The above code is for configuring web servers running apache server.

After URL will be like this