Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lighttpd redirect HTTPS to HTTP

Tags:

lighttpd

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

like image 557
user2757192 Avatar asked Jan 30 '26 12:01

user2757192


1 Answers

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

like image 174
Macattack Avatar answered Feb 03 '26 09:02

Macattack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!