我在另一个方向使用它(没有在这个方向测试,但应该工作).
if ( $scheme = https )
{
rewrite ^ http://$host$uri;
}
Run Code Online (Sandbox Code Playgroud)
编辑:限制位置和结束不要尝试重写更多:
location / {
if ( $scheme = https )
{
rewrite ^ http://$host$uri last;
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7234 次 |
| 最近记录: |