Bug #1495
closedhttps -> http redirection works only once after start
Description
If I configure redirect all urls that is not match appropriate pattern to http, then this is work only for first request. After it was cached, other requests doesn't work.
How to reproduce:
config:
$SERVER["socket"] == "0.0.0.0:80" { } $SERVER["socket"] == ":443" { ssl.engine = "enable" include_shell "cat /home/alek/certs/lighttpd.conf" $HTTP["url"] !~ "^/1.html" { $HTTP["host"] =~ "(.*)" { url.redirect = ( "^/(.*)" => "http://%1/$1" ) } } }
When you go first time to https://localhost/1.html, it just shows. When you open the same url second time and again, it redirects to http://localhost/1.html.
Debug logs of two serial requests are attached.
Files
Updated by alek almost 17 years ago
This was reproduced at Solaris 10 & FreeBSD 7.0
Updated by darix almost 17 years ago
you said:
"When you go first time to https://localhost/1.html, it just shows. When you open the same url second time and again, it redirects to http://localhost/1.html. Debug logs of two serial requests are attached."
but your config says:
"if the request is not "/1.html" redirect it to http"
the following config snippet says the same. please test that.
$SERVER["socket"] == "0.0.0.0:80" { } $SERVER["socket"] == ":443" { ssl.engine = "enable" include_shell "cat /home/alek/certs/lighttpd.conf" $HTTP["host"] =~ "(.*)" { url.redirect = ( "^/1.html" => "$0", "^/(.*)" => "http://%1/$1" ) } }
Updated by stbuehler almost 17 years ago
- Status changed from New to Fixed
- Resolution set to duplicate
I think this is a problem with condition caching, see #1164.
Also available in: Atom