I created a login page and I want to redirect me to a file which have .htaccess: deny from all The folder structure
main folder
|-include
|-connect
|-.htaccess( with deny from all)
|-index.php
|-admin.php
|-authenticate.php
Now: admin.php have the login which redirects me to authenticate.php which I want to redirect me to index.php but the .htaccess denied me this ( I use it to deny users to access the files from the include folder via address bar )...
In .htaccess I have the following lines of codes ?
Order deny,allow
Deny from all
<Files ~ "..\authenticate.php$">
Allow from all
</Files>
I think this is a very noob way to protect the data but I have no idea how to protect it other way... I found on google how to deny all files except one . But the problem is that I want all files denied and to access them only when the login session is done and the user is authenticated...