试图了解如何使redirect到所有httpstream量redirect到https lighttpd web服务器使用301 。
例如http://www.example.com应redirect到https://www.example.com ,它应该适用于所有子页面,因为它基本上重写为https 。
经过一些额外的search,我find了解决scheme 添加到lighttpd.conf重新启动,一切按预期工作。
$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") } }
我认为你做了一个错字,因为你写的http://mydomain应该redirect到http://mydomain ,我想你的意思是https://mydomain 。
我希望这能帮到您。 我已将这些信息用于我的NGINX Web服务器:
HSTS在Lightpttd – Turtorial