1
这是我的方案nginx的重写子文件夹和文件扩展名从URL
https://x.com/remove/something/subfolder/sub.html
应该重写
https://x.com/something/subfolder/sub
即我想在这个删除URL部分(remove
案例)和文件扩展名.html
到目结束我已经来到这个
location /remove {
rewrite ^/remove(/.*)$ $1 last;
}
,但它不工作
UPDATE
得到了remove
部分由 rewrite ^/remove/(.*)$ https://x.com/$1 last;
解决现在只需要的文件扩展去除仅