wiki:faq/security/cgi-basic-auth

Version 1 (modified by Jamie McClelland, 13 years ago) ( diff )

--

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]
Note: See TracWiki for help on using the wiki.