This is my first post, so be gentle. I am also more of a database admin than a web dev, so This there may be a simple solution that I am missing.
First, this is a LAMP stack.
The requirement: I need to redirect a specific set of users. Right now the redirect is done using code included in almost but not all php scripts. (It is the database connection script). However, there are a few scripts that do not call this common code. Is it possible to make a redirect decision at the web server level but use session values? The flow I imagine is:
- user logs in; session now contains the values to know if the redirect needs to happen
- user eventually accesses a page that needs to be redirected but does not call the code that is now doing redirect
- apache checks the session to determine if redirect is required and does redirect if needed.
Step 2 could be eliminated if a solution is possible, so that every page is redirected by apache after login.
Any ideas?