PiPass / blockpage

A temporary unblock solution and blockpage for your Pi-Hole system
BSD 3-Clause "New" or "Revised" License
196 stars 14 forks source link

Need Help: <redirecting block pages to https> #44

Closed jtovar43 closed 5 years ago

jtovar43 commented 5 years ago

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.

Screen Shot 2019-07-02 at 3 52 47 PM

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 5 years ago

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 5 years ago

Thanks this worked.