along 发表于 2013-1-9 21:54:46

phpdisk V-Core系列 伪静态规则

配置规则前,请确认您的服务器支持伪静态,或相应的模块已开启。

phpdisk V-Core 6.8

Apache伪静态:RewriteEngine On

RewriteRule ^file-(+)\.html$ viewfile.php?file_id=$1
RewriteRule ^downfile-(+)\.html$ downfile.php?file_id=$1
RewriteRule ^space-(.+)\.html$ space.php?username=$1
RewriteRule ^public-(+)-(+)\.html$ public.php?pid=$1&cate_id=$2
RewriteRule ^public\.html$ public.php

IIS伪静态:


# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

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

RewriteRule ^(.*)/file-(+)\.html$ $1/viewfile\.php\?file_id=$2
RewriteRule ^(.*)/downfile-(+)\.html$ $1/downfile\.php\?file_id=$2
RewriteRule ^(.*)/space-(.+)\.html$ $1/space\.php\?username=$2
RewriteRule ^(.*)/public-(+)-(+)\.html$ $1/public\.php\?pid=$2&cate_id=$3
RewriteRule ^(.*)/public\.html$ $1/public\.php

Nginx伪静态:rewrite ^(.*)/file-(+)\.html$ $1/viewfile.php?file_id=$2 last;
rewrite ^(.*)/downfile-(+)\.html$ $1/downfile.php?file_id=$2 last;
rewrite ^(.*)/space-(.+)\.html$ $1/space.php?username=$2 last;
rewrite ^(.*)/public-(+)-(+)\.html$ $1/public.php?pid=$2&cate_id=$3 last;
rewrite ^(.*)/public\.html$ $1/public.php last;
phpdisk V-Core 6.5

Apache伪静态:RewriteEngine On

RewriteRule ^file-(+)\.html$ viewfile.php?file_id=$1
RewriteRule ^viewfile-(+)-(*)\.html$ downfile.php?action=view&file_id=$1&file_key=$2
RewriteRule ^downfile-(+)-(*)\.html$ downfile.php?file_id=$1&file_key=$2
RewriteRule ^space-(.+)\.html$ space.php?username=$1 IIS伪静态:


# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

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

RewriteRule ^(.*)/file-(+)\.html$ $1/viewfile\.php\?file_id=$2
RewriteRule ^(.*)/viewfile-(+)-(*)\.html$ $1/downfile\.php\?action=view&file_id=$2&file_key=$3
RewriteRule ^(.*)/downfile-(+)-(*)\.html$ $1/downfile\.php\?file_id=$2&file_key=$3
RewriteRule ^(.*)/space-(.+)\.html$ $1/space\.php\?username=$2 Nginx伪静态:rewrite ^(.*)/file-(+)\.html$ $1/viewfile.php?file_id=$2 last;
rewrite ^(.*)/viewfile-(+)-(*)\.html$ $1/downfile.php?action=view&file_id=$2&file_key=$3 last;
rewrite ^(.*)/downfile-(+)-(*)\.html$ $1/downfile.php?file_id=$2&file_key=$3 last;
rewrite ^(.*)/space-(.+)\.html$ $1/space.php?username=$2 last;

Baby 发表于 2013-1-18 13:34:40

写个 IIS7 Web Server(独立主机用户) 伪静态呗..:)

mididi 发表于 2013-1-23 01:52:22

分类,页面的伪静态正常,预览跟下载的链接就出错,使用的是上面提供的apache规则,请问要如何修改呢?

永智 发表于 2013-3-12 11:01:18

问题同上,怎么没有人回应

永智 发表于 2013-3-12 11:29:01

6.8用phpdisk V-Core 6.5

Apache伪静态:
就可以了

真奇怪

小樱 发表于 2013-3-27 02:19:16

原来伪静态规则更新了~

cjcshadow 发表于 2013-3-30 11:20:44

phpdisk V-Core 6.8 里面的nginx规则里面的public 出错了。改成
rewrite ^(.*)/public\.html$ $1/public.php last;
就可以了。。

私はあなたを愛 发表于 2013-5-7 13:37:29

我的小站在子目录重么设置呢
页: [1]
查看完整版本: phpdisk V-Core系列 伪静态规则