Forum Moderators: phranque
Thanks for your help
znewsham
Putting authentication directives in a <Directory> section, in your main server configuration file, is the preferred way to implement this, and .htaccess files should be used only if you don't have access to the main server configuration file.
I think the answer to your question about requiring more than one login can be found in the Apache docs:
[httpd.apache.org...]
(See the "Getting it Working" section and read carefully. It discusses exactly the issue you want to learn about.)
Also see [httpd.apache.org...] for an example of using default password/user files for authentication. (Section "Apache Tutorial: .htaccess files".)
thanks, and sorry for the long message
znewsham
1) User hits the directory for the first time
2) User logs into the Apache mechanism
3) Credentials stored in a cookie (as I understand it?)
Maybe they also need to log in using PHP ... can't tell how your app works
4) Everything else is authenticated by PHP
Using that type of setup they would only need to log into Apache once, and everything else is handled by PHP authentication based on the cookie data.
The Apache .htaccess login protects raw directory access, but page access is controlled by PHP.
Maybe?