Web Auth via Pubcookie and Basic Auth
I get a significant number of requests for information on how to do this. It’s a pretty bad kludge, but it does seem to work.
Basically, you make three directories:
- one containing the content and an .htaccess file denying all access
- one containing an .htaccess file allowing access via basic auth
- one containing an .htaccess file allowing access via pubcookie
The directories with access via the different authentication methods will also contain symbolic links to either files in the content directory(if the files are not going to change much) or to another directory in the content directory so that you can change the files around without redoing the symbolic links.
You can take a look at an example implementation of this scheme in the multi-auth directory on my staff Web site.
Write a comment
You must be logged in to post a comment.