문제

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... :/

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top