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

推荐订阅源

博客园 - 叶小钗
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
V
Visual Studio Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
U
Unit 42
W
WeLiveSecurity
博客园 - Franky
Recent Announcements
Recent Announcements
Hacker News - Newest:
Hacker News - Newest: "LLM"
Attack and Defense Labs
Attack and Defense Labs
月光博客
月光博客
The Cloudflare Blog
Spread Privacy
Spread Privacy
腾讯CDC
P
Privacy International News Feed
N
News and Events Feed by Topic
AWS News Blog
AWS News Blog
NISL@THU
NISL@THU
T
Troy Hunt's Blog
小众软件
小众软件
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Microsoft Security Blog
Microsoft Security Blog
L
Lohrmann on Cybersecurity
Webroot Blog
Webroot Blog
Y
Y Combinator Blog
量子位
P
Palo Alto Networks Blog
N
News and Events Feed by Topic
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
IT之家
IT之家
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
云风的 BLOG
云风的 BLOG
C
Check Point Blog
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
G
Google Developers Blog
S
Secure Thoughts

一条大河

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

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