CodeIgniter Forums

Full Version: Routing issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
Hi All,
i am developing one application

where their will be two site
one

http://localhost/ci-acme/

and one admin section

http://localhost/ci-acme/__admin__


i am planning for dynamic page for normal section therefore i have changed the route.php

$route['(:any)'] = "maincms";

but now admin section is not opening.

than i changed this setting

$route['__admin__/news'] = "__admin__/news";

than this is coming
http://localhost/ci-acme/__admin__
but
this is not coming
http://localhost/ci-acme/__admin__/content

please suggest the way.

Regards
Anil

El Forum

[eluser]Kristories[/eluser]
Try this..
Code:
$admin       = 'custom_admin';
$route[$admin]      = 'home/admin';
$route[$admin.'/([a-zA-Z0-9]+)']   = '$1/admin/index';
$route[$admin.'/([a-zA-Z0-9]+)/(:any)']  = '$1/admin/$2';
$route[$admin.'/login']    = 'auth/admin/login';
$route[$admin.'/logout']    = 'auth/admin/logout';

Just call http://yours.com/custom_admin/controller/method

I hope this help you..