rewrite nginx

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

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

阅读 3.9k
2 个回答
server {
    listen       8000;
    ...

    location = /image/ {
        proxy_pass https://example1.com/;
    }
}
推荐问题
宣传栏