I'm deploying a PHP
website using lighttpd
. To get nice URLs working, I've put this into the configuration file:
url.rewrite = (
"^/(?!(wp-admin|wp-includes|wp-content))/(.*)" => "/index.php?$1",
)
This works well except of the following side effect.
- When I call a path where the regex in
url.rewrite
does not match and call$_SERVER['HTTPS']
, it will return"on"
. - When I call a path where the regex matches and call
$_SERVER['HTTPS']
, it will return nothing.
How can I tell PHP that the connection is secure when using url.rewrite
?