杰奇2.4伪静态规则怎么写教程,附环境配置

释放双眼,带上耳机,听听看~!

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

 

1
2
3
4
5
6
7
8
9
小说信息页面伪静态规则:/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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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伪静态,需要自己填入配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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端目录采用的是分页模式,并且还拥有正序倒序的功能,所以如果按照电脑的写法,将会导致无法翻页,正确的配置文件应该是将目录页的伪静态改为如下。

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

nginx的目录伪静态改为:

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

apache的目录伪静态改为:

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

                                 转载:规则之树

杰奇2.4,UTF8版本,解密修复版本在线下载

  123456789小说信息页面伪静态规则:/book/<{$id&#12

人已赞赏
杰奇CMS网络资源

杰奇2.4,UTF8版本,解密修复版本在线下载

2019-11-25 9:46:31

杰奇CMS

杰奇2.3伪静态规则写法与配置

2020-4-1 18:09:52

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
有新消息 消息中心
搜索