I am working on a script for my company.
The requirement is that only the authenticated IPs can access certain areas of our site (through browsing / application).
Our site has about 78 folders and have many files in each. I have built an admin control panel to add IPs and grant access to IPs on ALL or selected folders, and this is all saved in a database.
Now, I want to know what is the best way out to implement what I have done ? Means, how to enforce only the allowed IPs to access ?
I think if my script Updates/Creates .htaccess file in each folder and get the allowed IPs from database and write them to .htaccess file, will that solve my case ? Is there any other better approach ?
I want the same thing for the search engine bots, so shall my script create a robot file for each folder ?
Thanks & Best Regards