CodeIgniter Forums

Full Version: Disable a link possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I want to disable a link and route. Is it possible? i.e
PHP Code:
$route['test/admin'] = 'admin'

myproject.com/test/admin now going to myproject.com/admin, this is ok. But still myproject.com/admin link is working.

What i have need that disable the link so that no one can access through this link myproject.com/admin
I also need this functionality. But an addition that I want to achieve:
if i have a controller with name admin and I call the index method via domain/admin, but I want to disable url requests by domain/admin/index
How can I do that?
@rejoan

PHP Code:
$route['test/admin'] = 'admin' // go to controller admin via myproject.com/test/admin 
$route['admin'] = 'anythingYouWant' // if myproject.com/admin it leads to myproject.com/anythingYouWant 

anythingYouWant can be a 404 page