CodeIgniter Tutorials

How to remove controller name from the URL in CodeIgniter

How to remove controller name from the URL in CodeIgniter




In this tutorial I will explain how to remove controller name from the URL in CodeIgniter. In recent tutorial How to remove index.php from URL in CodeIgniter, we have explained how to remove index.php from the URL. Now we will remove controller name also from the URL. For example, if our signup page URL is like http://localhost/ci/home/signup here “home” is controller name and “signup” is controller function/method name. Now if …

Continue reading




How to load view as data in CodeIgniter

How to load view as data in CodeIgniter




In this tutorial I will let you know how to load view as data in CodeIgniter. If you want to load a view without sending output data to browser in CodeIgniter this tutorial will help you. Load view output to Browser Load View as data There is a third optional parameter lets you change the behavior of the method so that it returns data as a string rather than sending …

Continue reading




How to use remap method in CodeIgniter

How to use remap method in CodeIgniter




In this tutorial I will explain how to use remap method in CodeIgniter with simple example. CodeIgniter permits you to override which method in the controller gets called through the use of the _remap() method and allow you to define your own method routing rules. Note : If your controller contains a method named _remap(), it will always get called regardless of what your URI contains. For Example: If you …

Continue reading




How to remove index.php from URL in CodeIgniter

How to remove index.php from URL in CodeIgniter




If we need a clean URL in CodeIgniter. We need to remove index.php from url in CodeIgniter. So in this tutorial I will show you, how to remove index.php from URL in CodeIgniter. In default you will get index.php in url in CodeIgniter. like :- Codeigniter provide easy way for url rewrite functionality to get clean url or remove index.php from url in codeigniter. So we will follow some steps …

Continue reading