Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 使用 .htaccess 和 mod_rewrite 强制 SSL/https
嗨,我是 mod rewrite htaccess 的新手,谁能帮我将每个 http:// 请求重定向到 https:// 提前谢谢。
简单的说:
RewriteEngine On # Rewrite all non-HTTPS requests to HTTPS. RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]