vfm网盘程序(Nginx/Apache)伪静态规则

魔王先生 建站知识 1个月前 179℃ 0
摘要:

vfm网盘程序(Nginx/Apache)伪静态规则...

vfm网盘程序(Nginx/Apache)伪静态规则

index index.php;
rewrite /download/(.*)/h/(.*)/sh/(.*) /vfm-admin/vfm-downloader.php?q=$1&sh=$2 last;
rewrite /download/(.*)/h/(.*) /vfm-admin/vfm-downloader.php?q=$1&h=$2 last;
rewrite /download/zip/(.*)/n/(.*) /vfm-admin/vfm-downloader.php?zip=$1&n=$2 last;



For NGINX Servers try the following configuration:

Script running in sub directory (e.g: www.example.com/RELATIVE_PATH )



# nginx VFM configuration
location /RELATIVE_PATH {
    index index.php;
    rewrite /download/(.*)/h/(.*)/sh/(.*) /RELATIVE_PATH/vfm-admin/vfm-downloader.php?q=$1&sh=$2 last;
    rewrite /download/(.*)/h/(.*) /RELATIVE_PATH/vfm-admin/vfm-downloader.php?q=$1&h=$2 last;
    rewrite /download/zip/(.*)/n/(.*) /RELATIVE_PATH/vfm-admin/vfm-downloader.php?zip=$1&n=$2 last;
}



For IIS Servers try to convert the following rules:

Importing Apache mod_rewrite Rules in IIS 7 and above


Script running in web root (e.g: www.example.com/ )


if the script is not inside the web root, change the `RewriteBase` path


# begin VFM rules
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule download/(.*)/h/(.*)/sh/(.*) vfm-admin/vfm-downloader.php?q=$1&sh=$2 [L]
RewriteRule download/(.*)/h/(.*) vfm-admin/vfm-downloader.php?q=$1&h=$2 [L]
RewriteRule download/zip/(.*)/n/(.*) vfm-admin/vfm-downloader.php?zip=$1&n=$2 [L]
</IfModule>
# end VFM rules


发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。