Welcome Guest, Not a member yet? Register   Sign In
Routing wi secret code
#1

[eluser]boytun[/eluser]
Hello
In my appliaction I want to make my administration interface invisible until you whrite the right secret code to be redirected to the administration dashboard, but when you write the wrong secret code , 404 page displayed

EX:
loaclhost/right_secret_code ---------->localhost/admin_interface
loaclhost/wrong_secret_code ---------->localhost/invalid

the probleme here when I whrite this code,inthe route.php, in the 2 case i redirected to the 404 page.
Code:
$route['hyper_admin']='admin/user/login';
$route['admin/user/login']='invalid';

please how can I fix it ?
thanks in advance
#2

[eluser]TheFuzzy0ne[/eluser]
Doing this through routing doesn't make sense to me. I think this should be done via a controller. Once the code has been validated, you can set a flag in the session and redirect.




Theme © iAndrew 2016 - Forum software by © MyBB