Need Help: <redirecting block pages to https>
Closed this issue · 2 comments
jtovar43 commented
I am trying to redirect all http requests made to my pihole including the pipass blockpage to https using this line in /etc/lighttpd/external.conf
$HTTP["scheme"] == "http" { url.redirect = ("" => "https://${url.authority}${url.path}${qsa}") }
but when I implement this the result is a redirect to this unknown page.
I followed the instructions on the wiki to make the pipass page trusted and enabled SSL but I want to force everything to use SSL.
roenw commented
Hey, sorry I’ve been busy lately.
Have you tried
$HTTP["scheme"] == "http" {
# capture vhost name with regex conditiona -> %0 in redirect pattern
# must be the most inner block to the redirect rule
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://%0$0")
}
}
jtovar43 commented
Thanks this worked.