用于修复旧的下载链接的Nginx Rewrite规则

旧的下载链接是这样的:/?dl=file 由于原来处理下载请求的插件不工作了,所以就用Nginx的rewrite来修复。

if ($args ~* "^dl=(.*)") {
set $f $1;
rewrite ^.*$ /downloads/$f last;
}

Leave a Reply

Your email address will not be published. Required fields are marked *