menu

Codeigniter Remap Function


Codeigniter Remap Function : Codeigniter Remap Function is used to override the default function called in url.


For example : www.example.com/User/profile where Home is controller and user is method(function) name.

You can override the function name “profile” with other function name in the controller.
Means you can map original function name with your custom name in url.

Codeigniter Remap Function Example

For example if want to map url www.example.com/User/your_custom_name

1. Example :

Map http://localhost/User/about to the http://localhost/User/about_me

Hit the url

Where about calls about_me() function.

Demo

2. Example :

Map http://localhost/User/edu to the http://localhost/User/education

Hit the url

Where edu calls education() function.

Demo

Advertisements