Question

I am testing with Lighttpd and I need to redirect all requests HTTPS to HTTP index page, because i not have HTTPS systema enabled.

I tried to use this:

$SERVER["socket"] == ":443" {
    $HTTP["host"] == "." {
            url.redirect = ( "." => "http://%1" )
    }
}

but it not works for me... :/

Was it helpful?

Solution

You can't redirect https requests to http unless you can establish a https connection in the first place. The first thing that is done when the connection is opened is attempt to establish the ssl connection, nothing can be sent.

This isn't a lighttpd error or a config error but a reality of the https connection.

Pretty much a duplicate of: How to redirect https to http without any SSL Certificate

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top