X2.5的分区伪静态方法

IIS6.0 +IIS_Rewrite 2.9+httd.ini  参考本站
首页  帖子列表导航 帖子内容导航 均伪静态
1.httpd.ini
  1. RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html(\?(.*))*$ $1/plugin\.php\?id=$23&$5
复制代码
上面增加
  1. RewriteRule ^(.*)/gid-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?gid=$2&$4
复制代码
2.打开 templates/default/discuz.htm 大约在193行 首页伪静态
找到
  1. {if !empty($caturl)}$caturl{else}forum.php?gid=$cat[fid]{/if}
复制代码
替换成
  1. {if !empty($caturl)}$caturl{else}gid-$cat[fid].html{/if}
复制代码
3.打开source/module/forum/forum_forumdisplay.php 大约在73  82行处 帖子列表导航伪静态
找到
  1. <a href="forum.php?gid='.$forum_up['fid'].'">
复制代码
替换成
  1. <a href="gid-'.$forum_up['fid'].'.html">
复制代码
4.打开source/module/forum/forum_viewthread.php 大约在110 116行处 帖子内容导航伪静态
找到
  1. ? 'forum.php?gid='.$fup :
复制代码
替换成
  1. ? 'gid-'.$fup.'.html' :
复制代码
到此结束
看演示效果!
http://bbs.ceczyz.com

谢谢你啊,好帖子不顶不行












黄金百香果 黄金百香果功效 黄金百香果批发 黄金百香果价格

TOP