discuz x3 forum.php?gid= 伪静态的方法

2013-05-30 浏览:1865
discuz x3 forum.php?gid= 伪静态的方法
评论:(0)复制地址

使用这个功能需要编辑网站文件

  http://luntan.foshang.net/forum.php?gid=1 未为静态

  http://luntan.foshang.net/zixun/ 为静态后

首页编辑你的iis伪静态文件httpd.ini(以我的为例)

  RewriteRule ^(.*)/zixun\?*(.*)$ $1/forum\.php\?gid=1

其中这后面的gid=1 根据你的所需求的情况修改,还有前面定义的zixun也改成自己对应的

其次打开 \template\default\forum\discuz.htm

查找

<h2><a href="{if !empty($caturl)}$caturl{else}forum.php?gid=$cat[fid]{/if}" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2>

修改为:

<h2><a href="{if $cat[fid]==30}http://www.你的域名.com{elseif $cat[fid]==30}http://www.你的域名.com/shenghuo{elseif $cat[fid]==30}http://www.你的域名.com/rensheng{else}http://www.你的域名.com/forum.php?gid=$cat[fid]{/if}" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2>

评论:(0)复制地址

相关文章

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。