This tutorial will show you an example on how to we can separate front-end and back-end in Codeigniter. Front-end which is mainly used by public users who navigate through the site and sometimes register themselves to get updates on the site activities, new posts, update on a particular post etc. Back-end which is mainly used by site author, administrator, editor etc. to manage the site. So back-end will be restricted to some people with given roles.
Here I can use different URL, i.e., http://www.example.com/admin, for accessing directly admin login page or I can also use the URL http://www.example.com where login link is present on front-end header to navigate to the admin section.
First you need to go through https://www.roytuts.com/how-to-remove-index-php-from-url-in-codeigniter/, https://www.roytuts.com/setup-hmvc-with-codeigniter-2-1-4/ and https://www.roytuts.com/using-template-in-codeigniter/ tutorials for getting an idea for better understanding of the following implementation.
Continue reading “Separating Front-end and Back-end in Codeigniter”