Nginx 请求 URL 返回 301 状态码
Nginx About 258 words原因
在请求URL时发现没有添加/的请求,返回的是301状态码。
示例
test是一个文件夹,文件夹中有一个index.html页面。
http://localhost:8080/test
从定向到
http://localhost:8080/test/
相关配置
location /admin {
    alias /usr/share/nginx/html/dist;
    try_files $uri $uri/ /index.html last;
    index  index.html;
}
                Views: 1,275 · Posted: 2024-09-02
            
            ————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
 
        Loading...