| 修改前:https://tuyuanma.com/forum.php?gid=1修改后效果:https://tuyuanma.com/exo/1
 教程如下:第一步:找到并打开文件Discuz.htm,    路径 \template\default\forum找到以下代码:
 复制代码<font color="rgb(0, 0, 0)"><font style="font-size: 13px"><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></font></font>
把它替换成以下代码:复制代码<font color="rgb(0, 0, 0)"><font style="font-size: 13px"><h2><a href="{if !empty($caturl)}$caturl{else}q/$cat[fid]{/if}" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2></font></font>
复制代码
 discuz.htm 文件修改完成,保存。第二步:打开伪静态规则文件httpd.ini或.htaccess:如果是httpd.ini,则在里面添加如下伪静态规则:
 复制代码<font color="rgb(0, 0, 0)"><font style="font-size: 13px">RewriteRule ^(.*)/exo/(\w+)\.html(\?(.*))*nbsp; $1/forum\.php\?gid=$2&$4</font></font>
如果是.htaccess,则在里面添加如下伪静态规则:复制代码<font color="rgb(0, 0, 0)"><font style="font-size: 13px">RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^exo/(\w+)$ forum\.php\?gid=$1&$1</font></font>
保存。把上面两个修改的文件上传服务器,后台更新缓存。即可。完毕,有疑问,回复提出。
 
 |