$_SERVER['REQUEST_SCHEME'] do not work

RickDeckard

Verified User
Joined
Mar 18, 2011
Messages
105
Hi, i'm using OpenLiteSpeed without any issue, but.

$_SERVER['REQUEST_SCHEME']

result "empty".

Other environment informations like:

$_SERVER['HTTPS'], $_SERVER['SERVER_NAME'], etc

are working and return the values.
Any ideas?
Thanks
 
Bump, bump.
I'm seeing the same thing, OLS 1.7.16.
I found release 1.5.11 (2020-01-14) on https://openlitespeed.org/release-log/legacy-releases/ , which mentions
  • [Improvement] Added request variable REQUEST_SCHEME.
Yet, $_SERVER['REQUEST_SCHEME'] in php is not set, and using the REQUEST_SCHEME variable in a .htaccess RewriteRule will fill the error_log with [ERROR] [(null)] rewrite: unknown server variable while parsing: RewriteRule .* %{REQUEST_SCHEME}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301].
Any clues on how to fix this?
 
Hello,

While I have no idea on why %{REQUEST_SCHEME} is not working, I could suggest that you try $_SERVER['SERVER_PORT'] or %{SERVER_PORT}
 
Back
Top