杰奇2.4全站伪静态参考写法,附多环境配置

本文阅读 3 分钟
广告

杰奇2.4的解密版这几天一直在测试,问题蛮多的,但是大多数都不影响使用,至从上篇文章采集问题解决之后,感觉博客交流群里很多人都玩了起来。那么,其实还是有个待解决问题的,就是伪静态的设置,从之前的版本都可以看出来,杰奇的伪静态复杂度比一般的程序高很多,但是其实掌握了规律,配置是非常简单的。
以下是我在制作模板时候,顺便弄好的配置,可以使用,但是希望也可以自己修改扩展。
timg (1).jpg
我只写了满足基本要求的部分,剩下的照格式来写就行,当做学习吧。

杰奇后台伪静态的设置,我没写的自己按照格式写伪静态规则,或者不填。

小说信息页面伪静态规则:/book/<{$id}>
小说分类页面伪静态规则:/sort/<{$sortid}>/<{$page}>.html
排行榜页面伪静态规则:/top/<{$order}>/<{$page}>.html
书库伪静态规则:/book_<{$order}>_<{$rgroup}>_<{$sortid}>_<{$typeid}>_<{$words}>_<{$update}>_<{$initial}>_<{$isfull}>_<{$isvip}>_<{$page}>.html
小说目录页伪静态规则:/index/<{$aid}>
小说章节页伪静态规则:/book/<{$aid}>/<{$cid}>.html
搜索结果页伪静态规则:/search/<{$searchtype}>/<{$searchkey}>/<{$page}>.html
搜索结果页伪静态规则:/reviews/<{$aid}>/<{$page}>.html
标签列表页伪静态规则:/taglist/<{$sort}>/<{$page}>.html

apache伪静态,在根目录创建.htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^templates/(.*).html$ /404.php
RewriteRule ^themes/(.*)/(.*).html$ /404.php
RewriteRule ^modules/(.*)/templates/$ /404.php
RewriteRule ^modules/(.*)/templates/(.*).html$ /404.php
RewriteRule ^book/([0-9]+)$ /modules/article/articleinfo.php?id=$1
RewriteRule ^index/([0-9]+)$ /modules/article/reader.php?aid=$1 
RewriteRule ^book/([0-9]+)/([0-9]+)\.html$ /modules/article/reader.php?aid=$1&cid=$2 
RewriteRule ^vip/([a-zA-Z0-9]+)/([0-9]+).html$ /modules/obook/reader.php?aid=$1&cid=$2
RewriteRule ^sort/([0-9]+)/([0-9]+).html$ /modules/article/articlelist.php?sortid=$1&page=$2
RewriteRule ^buyvip/([0-9]+).html$ /modules/obook/buychapter.php?cid=$1
RewriteRule ^books$ /modules/article/articlefilter.php
RewriteRule ^top/([a-z]+)/([0-9]+).html$ /modules/article/toplist.php?order=$1&page=$2
RewriteRule ^search/([0-9]+)/(.*)/([0-9]+).html$ /modules/article/search.php?searchtype=$1&searchkey=$2&page=$3
RewriteRule ^taglist/([0-9]+)/(.*).html$  /modules/article/taglist.php?sort=$1&page=$2
RewriteRule ^book_([a-z]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([a-zA-Z0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).html$ /modules/article/articlefilter.php?order=$1&rgroup=$2&sortid=$3&typeid=$4&words=$5&update=$6&initial=$7&isfull=$8&isvip=$9&page=$10

nginx伪静态,需要自己填入配置文件:

if (!-d $request_filename){
    set $rule_0 1$rule_0;
}
if (!-f $request_filename){
    set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
    rewrite ^/templates/(.*).html$ /404.php;
}
rewrite ^/themes/(.*)/(.*).html$ /404.php;
rewrite ^/modules/(.*)/templates/$ /404.php;
rewrite ^/modules/(.*)/templates/(.*).html$ /404.php;
rewrite ^/book/([0-9]+)$ /modules/article/articleinfo.php?id=$1;
rewrite ^/index/([0-9]+)$ /modules/article/reader.php?aid=$1;
rewrite ^/book/([0-9]+)/([0-9]+)\.html$ /modules/article/reader.php?aid=$1&cid=$2;
rewrite ^/vip/([a-zA-Z0-9]+)/([0-9]+).html$ /modules/obook/reader.php?aid=$1&cid=$2;
rewrite ^/sort/([0-9]+)/([0-9]+).html$ /modules/article/articlelist.php?sortid=$1&page=$2;
rewrite ^/buyvip/([0-9]+).html$ /modules/obook/buychapter.php?cid=$1;
rewrite ^/books$ /modules/article/articlefilter.php;
rewrite ^/top/([a-z]+)/([0-9]+).html$ /modules/article/toplist.php?order=$1&page=$2;
rewrite ^/search/([0-9]+)/(.*)/([0-9]+).html$ /modules/article/search.php?searchtype=$1&searchkey=$2&page=$3;
rewrite ^/taglist/([0-9]+)/(.*).html$ /;
rewrite ^/book_([a-z]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([a-zA-Z0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).html$ /modules/article/articlefilter.php?order=$1&rgroup=$2&sortid=$3&typeid=$4&words=$5&update=$6&initial=$7&isfull=$8&isvip=$9&page=$10;

2019/06/13补充:

杰奇2.4的wap端目录采用的是分页模式,并且还拥有正序倒序的功能,所以如果按照电脑的写法,将会导致无法翻页,正确的配置文件应该是将目录页的伪静态改为如下。

'fakearticle' => '/index/<{$aid}>/<{$page}>/<{$order}>',

nginx的目录伪静态改为:

rewrite ^/index/([0-9]+)/([0-9]+)/([a-z]+)$ /modules/article/reader.php?aid=$1&page=$2&order=$3;

apache的目录伪静态改为:

RewriteRule ^index/([0-9]+)/([0-9]+)/([a-z]+)$ /modules/article/reader.php?aid=$1&page=$2&order=$3;

相关文件下载(伪静态文件等)

什么都没有,自己看文章学习

规则之树版权所有,转载请注明来源,标明作者及原文链接

本文来自投稿,不代表本站立场,如若转载,请注明出处:https://www.ruletree.club/archives/1245/
杰奇2.4版本,完美兼容关关采集器教程
« 上一篇 05-24
计算机进制和AI算法进制的个人议论
下一篇 » 05-30
广告

发表评论

V注册会员 L评论等级
R47 条回复
  1. 云海听歌Lv.1 说道:
    2019-08-05     Win 7 /    Chrome

    看看还有什么,,

  2. QQ游客Lv.1 说道:
    2019-07-23     Win 10 /    Chrome

    不错学习了

  3. sssLv.1 说道:
    2019-06-12     Win 7 /    Chrome

    不过 win系统 的 iis 版本的 伪静态 该怎么写啊

    1. 不暇VLv.6 说道:
      2019-06-12     Win 7 /    Chrome

      @sss

      用apache的自己转换

  4. oooLv.1 说道:
    2019-06-06     Win 7 /    Chrome

    不过 win系统 的 iis 版本的 伪静态 该怎么写啊

    1. 不暇VLv.6 说道:
      2019-06-08     Android /    Chrome

      @ooo

      百度一下,就可以找到在线转换的地方。

  5. ddLv.1 说道:
    2019-06-02     Win 7 /    FireFox

    不错学习了

  6. aLv.1 说道:
    2019-05-29     Win 7 /    Chrome

    感谢 大佬 辛苦制作分享

  7. 阿露Lv.3 说道:
    2019-05-26     Win 10 /    Chrome

    感谢 大佬 辛苦制作分享

没有更多评论了

作者信息

热门文章

标签TAG

热评文章