[英]Nginx redirect to https
這是我需要重定向到https
的塊:
location / {
try_files $uri $uri/ index.html?$query_string;
}
有什么方法可以將其簡單地轉發到https
嗎?
server {
server_name example.com;
location / {
rewrite ^(.*)$ https://example.com$1 permanent;
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.