[英]Nginx redirect to https
THis is the block i need to redirect to https
: 这是我需要重定向到
https
的块:
location / {
try_files $uri $uri/ index.html?$query_string;
}
Is there any way to simply forward this to https
? 有什么方法可以将其简单地转发到
https
吗?
server {
server_name example.com;
location / {
rewrite ^(.*)$ https://example.com$1 permanent;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.