hide application name |
Hi
In my application, I have two modules(application names) like 'admin', 'user'. Now I don't want to display application name in the URL, how can I achieve this? either by .htaccess or by URL routing Example: http://localhost/myapplication/admin/dashboard now my requirement is I didn't want to display 'admin' from URL
you need routing i think
$route['dashboard'] = 'admin/dashboard/index'; your new url will be http://localhost/myapplication/dashboard and dashboard will be mapped to admin folder, dashboard controller, index method EDIT :: you can maybe search in doc for doing wildcard and regexp routes to match all your routes to the wanted folder with someting like that $route['login/(.+)'] = 'auth/login/$1'; or $route['products/([a-z]+)/(\d+)'] = '$1/id_$2'; see the doc http://www.codeigniter.com/user_guide/ge...uting.html |
Welcome Guest, Not a member yet? Register Sign In |