PHPDisk网盘官方论坛

 找回密码
 立即注册
网盘分享动态:
E-Core企业网盘系统v4.0试用版(2024年)官方论坛版主招募啦~期待您的加入PHPDisk 7.0 V-Core系列发布[下载]
招聘团队,开发phpdisk项目【有兴趣即可加入】phpdisk新版本 Windows客户端软件详尽~PHPDisk 模板制作教程
PHPDISK网盘专用探针 V2.1 PHPDisk插件开发教程PHPDisk交流Q群,加入->
查看: 7950|回复: 7

phpdisk V-Core系列 伪静态规则

[复制链接]

已分享文件:20个

网盘今日赚:积分

发表于 2013-1-9 21:54:46 | 显示全部楼层 |阅读模式
配置规则前,请确认您的服务器支持伪静态,或相应的模块已开启。

phpdisk V-Core 6.8

Apache伪静态:
  1. RewriteEngine On

  2. RewriteRule ^file-([0-9]+)\.html$ viewfile.php?file_id=$1 [NC]
  3. RewriteRule ^downfile-([0-9]+)\.html$ downfile.php?file_id=$1 [NC]
  4. RewriteRule ^space-(.+)\.html$ space.php?username=$1 [NC]
  5. RewriteRule ^public-([0-9]+)-([0-9]+)\.html$ public.php?pid=$1&cate_id=$2 [NC]
  6. RewriteRule ^public\.html$ public.php [NC]

复制代码
IIS伪静态:

  1. [ISAPI_Rewrite]

  2. # 3600 = 1 hour
  3. CacheClockRate 3600

  4. RepeatLimit 32

  5. # Protect httpd.ini and httpd.parse.errors files
  6. # from accessing through HTTP

  7. RewriteRule ^(.*)/file-([0-9]+)\.html$ $1/viewfile\.php\?file_id=$2 [I]
  8. RewriteRule ^(.*)/downfile-([0-9]+)\.html$ $1/downfile\.php\?file_id=$2 [I]
  9. RewriteRule ^(.*)/space-(.+)\.html$ $1/space\.php\?username=$2 [I]
  10. RewriteRule ^(.*)/public-([0-9]+)-([0-9]+)\.html$ $1/public\.php\?pid=$2&cate_id=$3 [I]
  11. RewriteRule ^(.*)/public\.html$ $1/public\.php [I]

复制代码
Nginx伪静态:
  1. rewrite ^(.*)/file-([0-9]+)\.html$ $1/viewfile.php?file_id=$2 last;
  2. rewrite ^(.*)/downfile-([0-9]+)\.html$ $1/downfile.php?file_id=$2 last;
  3. rewrite ^(.*)/space-(.+)\.html$ $1/space.php?username=$2 last;
  4. rewrite ^(.*)/public-([0-9]+)-([0-9]+)\.html$ $1/public.php?pid=$2&cate_id=$3 last;
  5. rewrite ^(.*)/public\.html$ $1/public.php last;
复制代码
phpdisk V-Core 6.5

Apache伪静态:
  1. RewriteEngine On

  2. RewriteRule ^file-([0-9]+)\.html$ viewfile.php?file_id=$1 [NC]
  3. RewriteRule ^viewfile-([0-9]+)-([a-z0-9]*)\.html$ downfile.php?action=view&file_id=$1&file_key=$2 [NC]
  4. RewriteRule ^downfile-([0-9]+)-([a-z0-9]*)\.html$ downfile.php?file_id=$1&file_key=$2 [NC]
  5. RewriteRule ^space-(.+)\.html$ space.php?username=$1 [NC]
复制代码
IIS伪静态:

  1. [ISAPI_Rewrite]

  2. # 3600 = 1 hour
  3. CacheClockRate 3600

  4. RepeatLimit 32

  5. # Protect httpd.ini and httpd.parse.errors files
  6. # from accessing through HTTP

  7. RewriteRule ^(.*)/file-([0-9]+)\.html$ $1/viewfile\.php\?file_id=$2 [I]
  8. RewriteRule ^(.*)/viewfile-([0-9]+)-([a-z0-9]*)\.html$ $1/downfile\.php\?action=view&file_id=$2&file_key=$3 [I]
  9. RewriteRule ^(.*)/downfile-([0-9]+)-([a-z0-9]*)\.html$ $1/downfile\.php\?file_id=$2&file_key=$3 [I]
  10. RewriteRule ^(.*)/space-(.+)\.html$ $1/space\.php\?username=$2 [I]
复制代码
Nginx伪静态:
  1. rewrite ^(.*)/file-([0-9]+)\.html$ $1/viewfile.php?file_id=$2 last;
  2. rewrite ^(.*)/viewfile-([0-9]+)-([a-zA-Z0-9]*)\.html$ $1/downfile.php?action=view&file_id=$2&file_key=$3 last;
  3. rewrite ^(.*)/downfile-([0-9]+)-([a-zA-Z0-9]*)\.html$ $1/downfile.php?file_id=$2&file_key=$3 last;
  4. rewrite ^(.*)/space-(.+)\.html$ $1/space.php?username=$2 last;
复制代码

已分享文件:0个

网盘今日赚:积分

发表于 2013-1-18 13:34:40 | 显示全部楼层
写个 IIS7 Web Server(独立主机用户) 伪静态呗..

已分享文件:0个

网盘今日赚:积分

发表于 2013-1-23 01:52:22 | 显示全部楼层
分类,页面的伪静态正常,预览跟下载的链接就出错,使用的是上面提供的apache规则,请问要如何修改呢?

已分享文件:0个

网盘今日赚:积分

发表于 2013-3-12 11:01:18 | 显示全部楼层
问题同上,怎么没有人回应

已分享文件:0个

网盘今日赚:积分

发表于 2013-3-12 11:29:01 | 显示全部楼层
6.8用phpdisk V-Core 6.5

Apache伪静态:
就可以了

真奇怪

已分享文件:0个

网盘今日赚:积分

发表于 2013-3-27 02:19:16 | 显示全部楼层
原来伪静态规则更新了~

已分享文件:0个

网盘今日赚:积分

发表于 2013-3-30 11:20:44 | 显示全部楼层
phpdisk V-Core 6.8 里面的nginx规则里面的public 出错了。改成
rewrite ^(.*)/public\.html$ $1/public.php last;
就可以了。。

已分享文件:0个

网盘今日赚:积分

发表于 2013-5-7 13:37:29 | 显示全部楼层
我的小站在子目录重么设置呢
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /1 下一条

小黑屋|Archiver|手机版|PHPDisk官方论坛 ( 粤ICP备10073657号 )

GMT+8, 2024-3-29 19:45 , Processed in 0.061536 second(s), 34 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表