discuz【瀑布流图文】插件伪静态规则

作者:笨小孩 发布于:2012-10-18 16:26 分类:网站程序

首先把dz官方插件伪静态格式注释掉。

nginx:

rewrite ^([^\.]*)/cate([0-9]*)e([0-9]*)e([0-9]*)e([0-9]*)e([0-9]*)\.html$ $1/plugin.php?id=waterfall:waterfall&fid=$2&filter=$3&orderby=$4&sub=$5&page=$6 last;

apache:

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^cate([0-9]*)e([0-9]*)e([0-9]*)e([0-9]*)e([0-9]*)\.html$ plugin.php?id=waterfall:waterfall&fid=$1&filter=$2&orderby=$3&sub=$4&page=$5%1

iis6.0:

RewriteRule ^(.*)/cate([0-9]*)e([0-9]*)e([0-9]*)e([0-9]*)e([0-9]*)\.html(\?(.*))*$ $1/plugin\.php\?id=waterfall:waterfall&fid=$2&filter=$3&orderby=$4&sub=$5&page=$6

如果要首页为该插件,首先在web服务器中将网站默认首页设置成plugin.php

然后修改dz程序根目录下plugin.php,在

if(!empty($_GET['id'])) {

上一行加入

empty($_GET['id']) && $_GET['id'] = ‘waterfall:waterfall’;

标签: 伪静态 discuz

发表评论:

手机版 | 
Copyright © 2012 lamp46.com All Right Reserved. sitemap