Skip to content

Commit

Permalink
lighttpd: prefer 308 to 301 for HTTP redirection
Browse files Browse the repository at this point in the history
x-ref:
  "308 Permanent Redirect"
  mozilla#117
  "For Apache, prefer 308 Permanent Redirect to 301 Moved Permanently"
  mozilla#137
  • Loading branch information
gstrauss committed Sep 18, 2022
1 parent a0208aa commit 9835264
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/templates/partials/lighttpd.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ $HTTP["scheme"] == "https" {
)
}
else $HTTP["scheme"] == "http" {
{{#if (minver "1.4.31" form.serverVersion)}}
url.redirect-code = {{output.permanentRedirect}}
{{/if}}
{{#if (minver "1.4.50" form.serverVersion)}}
url.redirect = ("" => "https://${url.authority}${url.path}${qsa}")
{{else}}
Expand Down

0 comments on commit 9835264

Please sign in to comment.