主页 > 网站建设 > 建站知识 > dedecms5.7问答模块实现伪静态的方法

dedecms5.7问答模块实现伪静态的方法

POST TIME:2017-12-13 22:32

dedecms5.7问答模块实现伪静态的方法步骤详细的解说下;
1、把rewrite文件放到网站根目录;可选;httpd.ini规则则按照原有的规则来;及现在的规则;
2、在iis中的isapi中支持rewrite;
3、在系统后台选择启用rewrite;
4、重启iis;
5、修改必要文件,主要是index.php、index.htm、question.htm、browser.htm、question.php、browser.php
主要是把链接地址<a href="?ct=browser&<?php echo $tidstr.$mulappname;?>&lm=2">
改为:<a href="/ask/?ct=browser&<?php echo $tidstr.$mulappname;?>&lm=3">
这几个文件分别在:ask\control \ask\templates\default 以及首页的index.php
当然以上是在后台支持rewrite的情况下,操作的;
httpd.ini规则:

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^/ask/index\.html$ /ask/index\.php
RewriteRule ^/ask/([0-9]+)$ /ask/\?ct=browser&tid=$1
RewriteRule ^/ask/t([0-9]+)$ /ask/\?ct=browser&tid2=$1
RewriteRule ^/ask/([0-9]+)\.html$ /ask/\?ct=question&askaid=$1

 



收缩
  • 微信客服
  • 微信二维码
  • 电话咨询

  • 400-1100-266