I have folder /admin/index.php how to restrict access to that folder except logged user. I try to restrict access with .htaccess but it restrict access at all
Asked
Active
Viewed 331 times
-5
-
Well, what have you tried? – Isaiah Turner May 30 '14 at 12:23
-
when i logging to mysql i check if the user type is admin. IF is admin loading admin/index.php but every visitor can acces admin page. I try with .htaccess - deny from all but deny and logged user – Sasa Jovic May 30 '14 at 12:25
1 Answers
0
On your /admin/index.php are you checking these things:
- Is the user logged in? - If not, redirect them to the login page.
- Is the logged in user an Admin? - If not, redirect them to another page.
Seems like the logical way to tackle this.

l0gic
- 121
- 5