对nginx的rewrite功能进行了扩展, 每当用户访问/down/15.torrent 下的文件的时候,自动去访问download.php文件
第一步 修改 include/func.php第2065行的连接改了。去掉。torrent
第二步 修改nginx.conf ,添加如下内容
if ($host ~* (.*)/.sdu6/.edu/.cn) {
set $sub_name $1;
rewrite ^/down/(/d+)/?$ /download.php?tid=$1 last;
}