How do I get my PHP/perl/etc. cgi script to access the username and password passed via HTTP basic auth?

Our web server allows members to password protect a directory using what is called HTTP Basic Authentication.

However, by default, the username and password entered will not be accessible by cgi scripts, such as PHP or perl scripts.

If you would like this information to be available, you will need to edit your web configuration via the Members Control panel, adding:

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
Last modified 9 years ago Last modified on Feb 2, 2013, 6:44:47 PM