|  | 
 
| 杰奇小说系统1.7的伪静态,网站伪静态一直是个难点,现将自己伪静态的方法放出,希望对在做杰奇系统伪静态的朋友有一点帮助! 还有不理解的欢迎一起交流!示范网站:Q猪言情小说吧
 
 一、首先在“后台-参数设置”伪静态加入代码:
 1、文章信息页面伪静态规则:/book/<{$id}>.html
 2、文章分类页面伪静态规则:/list/<{$class}>-<{$page}>.html
 3、首字母分类页面伪静态规则:/initial/<{$initial}>-<{$page}>.html
 4、排行榜页面伪静态规则:/toplist/<{$sort}>-<{$page}>.html
 
 二、首先在rewrite加载的http.ini中设置代码如(加载后记得重启IIS):
 [ISAPI_Rewrite]
 RewriteCond Host: (.+)
 RewriteCond Referer: (?!http://\1.*).*
 RewriteCond Referer
  ?!http://(?:.*\.baidu\.com|baidu\.com)).+ RewriteRule .*\.(?:gif|jpg|png|exe|rar|zip|torrent|bmp|pdf)/block.gif [I,O,N]
 #以下为目录页,阅读页设置
 RewriteRule ^(.*)/booklist/0/([0-9]+)/index\.html$$1/modules/article/reader\.php\?aid=$2 [L]
 #以下为内容页,阅读页设置
 RewriteRule ^(.*)/bookreader/([0-9]+)-([0-9]+)\.html$$1/modules/article/reader\.php\?aid=$2&cid=$3
 #以下为信息页,分类页,排行,字母排行页设置
 RewriteRule ^(.*)/book/([0-9]+)\.html$$1/modules/article/articleinfo\.php\?id=$2 [L]
 RewriteRule ^(.*)/list/([0-9]+)/index\.html$$1/modules/article/articlelist\.php\?class=$2 [L]
 RewriteRule ^(.*)/toplist/allvisit\.html$$1/modules/article/toplist\.php\?sort=allvisit [L]
 RewriteRule ^(.*)/initial/([1A-Z])\.html$$1/modules/article/articlelist\.php\?initial=$2 [L]
 三、然后修改模板中的地址
 1、“点击阅读”的地址(目录页地址)modules\article\templates\articleinfo.html
 代码变为:
 /booklist/0/{?$articleid?}/
 
 2、最新章节地址 modules\article\templates\articleinfo.html
 代码变为:
 /bookreader/{?$articleid?}_{?$lastchapterid?}.html
 3、修改目录模板 modules\article\templates\index.html
 将目录的超链接改为:
 
 <ahref="/bookreader/{?$articleid?}_{?$indexrows.cid1?}.html">
 <ahref="/bookreader/{?$articleid?}_{?$indexrows.cid2?}.html">
 <ahref="/bookreader/{?$articleid?}_{?$indexrows.cid3?}.html">
 <ahref="/bookreader/{?$articleid?}_{?$indexrows.cid4?}.html">
 四、修改对应的模块中的动态地址:
 1、链接信息页调用:
 将
 {?$articlerows.url_articleinfo?}
 修改成:
 /book/{?$articlerows.articleid?}.html
 2、链接目录页调用:
 将
 {?$articlerows.url_articleindex?}
 修改成:
 /booklist/0/{?$articlerows.articleid?}/
 3、链接内容页调用:
 将
 {?$articlerows.url_lastchapter?}
 等修改成
 /bookreader/{?$articlerows.articleid?}_{?$articlerows.lastchapterid?}.html
 以上根据Q猪言情小说吧 http://www.qzread.com为例进行的相关设置讲解,具体操作可根据自己的爱好作相应调整。
 
 
 | 
 |