how to access controllers in 'admin' directory

#1
[eluser]Blue Sapphire[/eluser]
I have created 'admin' folder in 'controllers' folder. I have created a controller (user) in 'admin' folder.

I have added following line in routes.php file :

Quote:$route['admin/(:any)'] = 'admin/([a-zA-Z0-9/_]+)';

I am using following url to access user controller in admin folder.
Quote:http://localhost/main/forum/admin/user/

My application is routed to default controller.

Can someone guide me what Iam doing wrong and how it can be rectified.

Thanks in advance

#2
[eluser]InsiteFX[/eluser]
Try this:
Code:
$route['admin/(:any)'] = 'admin/$1';

InsiteFX

#3
[eluser]Blue Sapphire[/eluser]
Thanks for the reply, but it didn't work. Actually my problem is that, my urls are containing variable like as follows:

Quote:http://localhost/main/forum/admin/user/view
http://localhost/main/forum/admin/user/create
http://localhost/main/forum/admin/user/delete/uid/1/uname/my_name
http://localhost/main/forum/admin/dashboard/first_var/2/second_var/3/third_var/4

So from above examples, you can see that urls are very dynamic in nature.

Can you suggest me some solution, keeping in view the above examples.

Thanks in advance


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.