| | 1 | = How do I get my PHP/perl/etc. cgi script to access the username and password passed via HTTP basic auth? = |
| | 2 | |
| | 3 | Our web server allows members to [wiki:password_protect_directory password protect a directory] using what is called HTTP Basic Authentication. |
| | 4 | |
| | 5 | However, by default, the username and password entered will not be accessible by cgi scripts, such as PHP or perl scripts. |
| | 6 | |
| | 7 | If you would like this information to be available, you will need to edit your web configuration via the [https://members.mayfirst.org/cp Members Control panel], adding: |
| | 8 | |
| | 9 | {{{ |
| | 10 | RewriteEngine On |
| | 11 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] |
| | 12 | }}} |