rewrite nginx

浏览:44日期:2022-07-16

问题描述

http://example.com:8000/image/ -> https://example1.com/

这样一个重定向,该怎么写?我试了rewrite ^(/image)$ https://example1.com/ permenant结果重定向到https://example1.com/image/

问题解答

回答1:

server { listen 8000; ... location = /image/ {proxy_pass https://example1.com/; }}回答2:

如果你用的openresty,可以看看这个 /a/1190000004680996

相关文章: