hxft 发表于 2010-8-24 13:13:23

主机是lighttp的求大侠们给个伪静态重写规则

升级到5,才发现没有重写规则不能静态化.主机是lighttp的求大侠们给个伪静态重写规则

http://i3dna.com/_disk/file-113.html


diahosting官方给的伪静态规则 wp和dz的:
WordPress lighttpd的rewrite(伪静态)规则如下

url.rewrite = (
"^/(wp-.+).*/?" => "$0",
"^/(sitemap.xml)" => "$0",
"^/(xmlrpc.php)" => "$0",
"^/(.+)/?$" => "/index.php/$1"
)

Discuz lighttpd的rewrite(伪静态)规则如下


url.rewrite-once = (
"^/archiver/((fid|tid)-[\w\-]+\.html)$" => "archiver/index.php?$1",
"^/forum-(+)-(+)\.html$" => "forumdisplay.php?fid=$1&page=$2",
"^/thread-(+)-(+)-(+)\.html$" => "viewthread.php?tid=$1&extra=page=$3&page=$2",
"^/space-(username|uid)-(.+)\.html$" => "space.php?$1=$2",
"^/tag-(.+)\.html$" => "tag.php?name=$1"
)

[ 本帖最后由 hxft 于 2010-8-24 13:17 编辑 ]

hxft 发表于 2010-8-24 14:39:31

url.rewrite-once = (^(.*)/file-(+)\." => "$1/viewfile.php?file_id=$2 ^(.*)/viewfile-(+)-(*)\." => "$1/downfile.php?action=view&file_id=$2&file_key=$3 ^(.*)/downfile-(+)-(*)\." => "$1/downfile.php?file_id=$2&file_key=$3 ^(.*)/space-(.+)\." => "$1/space.php?username=$2 )

自己改了一个规则,但目前还是不行呵.........

hxft 发表于 2010-9-3 01:29:24

没人????????????????

along 发表于 2010-9-3 10:01:39

试下这个 适合 phpdisk v5.0,5.1 版本:
url.rewrite-once = (
"^/file-(+)\.html$" => "viewfile.php?file_id=$1&file_key=$2",
"^/viewfile-(+)-(.*)\.html$" => "downfile.php?action=view&file_id=$1&file_key=$2",
"^/downfile-(+)-(.*)\.html$" => "downfile.php?file_id=$1&file_key=$2",
"^/space-(.+)\.html$" => "space.php?username=$1"
)

hxft 发表于 2010-9-3 16:12:33

回复 4# along 的帖子

谢谢,看看去...:loveliness: :loveliness: :loveliness:

还没有成功...开启重写后,前台文件页面404

[ 本帖最后由 hxft 于 2010-9-3 16:59 编辑 ]
页: [1]
查看完整版本: 主机是lighttp的求大侠们给个伪静态重写规则