Use when checking whether a web server is configured to redirect all HTTP traffic to HTTPS.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-http-to-https-9944b51f9971 ,按照其中的说明把「http-to-https」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Without an HTTP-to-HTTPS redirect, users who type the domain without https:// or follow old links land on the insecure version of the site, exposing session cookies and form data to network attackers.
http://example.com to https://example.com with HTTP 301 (permanent redirect)https://$host$request_uriTest whether http://example.com redirects to https://example.com with a 301 status code. Check that the full URL path and query string are preserved in the redirect Location header.
Configure the web server to redirect all HTTP requests to HTTPS with a 301 status code, preserving the full request path. Verify the redirect with curl -I http://example.com.
Explain why redirecting HTTP to HTTPS is necessary, the difference between 301 and 302 redirects, and how HSTS can eliminate the redirect for returning users.
Review server config, headers, forms, and integration points related to Redirect HTTP to HTTPS. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/security/http-to-https