Various Apache modules can strip “Authorization: Basic base64(user:passwd)” header.
The following solution found on the internet is wrong, because it will set $_SERVER[‘REDIRECT_HTTP_AUTHORIZATION’] and not the required $_SERVER[‘HTTP_AUTHORIZATION’]:
RewriteRule .* index.php [QSA,E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
The proper solution is to pass the required header directly to PHP backend via the env:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Add this line to .httaccess or to <VirtualHost> of httpd.conf, don’t forget that the latter requires restarting Apache.
Thanks for that. It solved my problem. Every snippet I found was the first one.
Thanks for that. It solved my problem too
Hii i am still getting the same error.
Using cpanel with easy apache 2.4 + php5.6 + FastCGI
I am still getting 401 error.
Thank you very much.. you saved my day.
After a day configuring plugins and htaccess and installing perl module and change cpanel easy apache config. this work for me, just simple.
add to htaccess how exactly?
Can you share which line and how it looks on htacess
1 Pingback
Recent Posts
Recent Comments
Archives
Categories
Meta
Recent Posts
Recent Comments
Archives
Categories
Meta