My web server is running PHP applications with lighttpd and PHP-FPM for years. Now, after a 3rd-Party software upgrade, I must include some rules in order to activate a REST API.
<IfModule mod_setenvif.c>
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
</IfModule>
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /api/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
I would like to understand what is it doing, and rewrite it based on lighttpd configuration if it has the support.