惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Recent Announcements
Recent Announcements
IT之家
IT之家
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
大猫的无限游戏
大猫的无限游戏
U
Unit 42
罗磊的独立博客
博客园 - Franky
WordPress大学
WordPress大学
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
SecWiki News
SecWiki News
V
Vulnerabilities – Threatpost
P
Privacy International News Feed
P
Palo Alto Networks Blog
F
Fortinet All Blogs
P
Proofpoint News Feed
博客园 - 叶小钗
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
Spread Privacy
Spread Privacy
S
Securelist
C
Cisco Blogs
I
Intezer
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cyberwarzone
Cyberwarzone
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
S
Schneier on Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
GbyAI
GbyAI
T
Troy Hunt's Blog
T
Threatpost
博客园 - 司徒正美
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
AWS News Blog
AWS News Blog
T
The Blog of Author Tim Ferriss
G
GRAHAM CLULEY
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News
Know Your Adversary
Know Your Adversary
S
SegmentFault 最新的问题

一条大河

Z-BLOG 插件之 AI 检索地图(辅助 AI 理解网站) - Z-BLOG应用 - 一条大河 Z-BLOG 插件之大猩猩文章工厂(持续养站方案) - Z-BLOG应用 - 一条大河 如何判断 Linux 服务器是否被入侵 ? - 攻略指北 - 一条大河 解决:The page at 'XXXX' was loaded over HTTPS ... - 攻略指北 - 一条大河 Z-BLOG 渐进式缓存风火轮版(数据库优化+全站静态) - Z-BLOG应用 - 一条大河 Z-BLOG 内容分发插件(站群管理 + 数据广播) - Z-BLOG应用 - 一条大河 变色龙模版伪原创 Z-BLOG 插件(干扰码 + 唯一模版) - Z-BLOG应用 - 一条大河 Z-BLOG 城市分站插件,支持泛解析、二级目录子站 - Z-BLOG应用 - 一条大河 ZBlog 城市分站插件使用教程(基础设置+泛解析) - 攻略指北 - 一条大河
ZBlog 城市分站二级目录模式配置教程 - 攻略指北 - 一条大河
2021-06-04 · via 一条大河

此文章仅阐述该插件 二级目录模式 的配置方式 泛解析模式 和基础教程请参考:城市分站入门教程

一、开启二级目录模式

插件默认处于泛解析模式,二级目录需要手动开启,如下图

image.png

二、修改服务器伪静态配置

Nginx 伪静态配置如下(推荐)

if (-f $request_filename/index.html){
 rewrite (.*) $1/index.html break;
}

if (-f $request_filename/zb_users/plugin/iddahe_com_city/index.php){
 rewrite (.*) $1/zb_users/plugin/iddahe_com_city/index.php;
}

if (-f $request_filename/index.php){
 rewrite (.*) $1/index.php;
}

if (!-f $request_filename){
 rewrite (.*) /zb_users/plugin/iddahe_com_city/index.php;
}

Apache、IIS 在入口文件添加如下代码即可(最新版插件)

// 找到网站根目录的 index.php 文件,在 “<?php” 之后新起一行粘贴此段代码
require_once __DIR__.'/zb_users/plugin/iddahe_com_city/rewrite.php';

注:关闭插件后,伪静态或添加的代码段需要手动恢复

三、ZBlog 后台 URL 规则配置

配置地址:你的域名/zb_users/plugin/STACentre/main.php (静态管理中心,需要先开启)

该规则不是严格要求的,主要是 URl 规则中需要包含  app-city-path 段,若你不明白此设置,请和我保持一致

文章的URL配置:{%host%}app-city-path/{%id%}.html
页面的URL配置:{%host%}app-city-path/{%id%}.html
首页的URL配置:{%host%}app-city-path/page-{%page%}.html
分类页的URL配置:{%host%}app-city-path/{%alias%}-{%page%}
标签页的URL配置:{%host%}app-city-path/tags-{%id%}-{%page%}.html
日期页的URL配置:{%host%}app-city-path/date-{%date%}-{%page%}
作者页的URL配置:{%host%}app-city-path/author-{%id%}-{%page%}

注:如果你需自定义的地址,且想添加城市目录到 URL 中,请将 app-city-path 添加到你的链接中,格式:你的域名/app-city-path/1.html

四、地图设置,参考下图即可

image.png

若按照上述教程配置好,且没有生效的朋友,请携带订单号和我联系。