no

How to create a new index inside a subdirectory in codeigniter

I am using codeigniter framework in my php project and I have a requirement like this: When the url is */admin/, the application should ca...

I am using codeigniter framework in my php project and I have a requirement like this:

When the url is */admin/, the application should call the index.php inside the admin folder.

Folder structure:
+codeigniter app
 +application
  +controller
   +index.php (the application's default)
   +admin (the admin's index.php should be here)
    +index.php
  +config

Looking at the codeigniter's documentation on URI Routing, this can be achieve by adding this line on: application/config/routes.php


$route['admin'] = 'admin/index';


I love codeigniter!

Related

php 1058184585698627364

Post a Comment

1 comment

Anonymous said...

thanks...

So simple and yet so effective!

item