I have been given the task of making user management of an existing site more automated. In the past, the owner has used .htaccess files to determine who can and can not enter the members area. But as you can probably imagine as the site is growing, this is loosing it's feasibility.
The issue which is making this a challenge is that the site is built on a huge number of .shtml pages, so converting them to something else would be a nightmare. This means if there is an option that would allow the current stucture to work, then this would be best.
I have implemented a very temporary solution using tables and a small database. It's incredibly easy to bypass so something better needs to be done.
Since he's had success with .htaccess in the past, I was wondering if there was some way of making php work well with .htaccess in controlling who can and can not login. Ultimatley, I would like to have it controlled by the DB since it is easily managed.
I've considered making the program build a .htaccess file from the DB. This seems feasible, but also breakable. If neccessary I will do it, but I'm sure there must be a cleaner way.
I was wondering about ini_set but I'm not sure if that's going to work. It looks like something that might work but may be fidely and hard to diagnose(early impression).
I also was wondering about $_SERVER. But I think this is even more of a shot in the dark.
This post (right at the bottom), sparked my thoughts on making php and .htaccess work together.
Any thoughts? Any ideas that are cleaner that generating the .htaccess files?
Thanks in advance. 🙂