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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
D
Docker
S
SegmentFault 最新的问题
博客园 - 聂微东
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
L
LangChain Blog
Vercel News
Vercel News
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
Engineering at Meta
Engineering at Meta
T
Threat Research - Cisco Blogs
T
Threatpost
Scott Helme
Scott Helme
T
Tailwind CSS Blog
Latest news
Latest news
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
The Register - Security
The Register - Security
罗磊的独立博客
P
Proofpoint News Feed
腾讯CDC
S
Schneier on Security
雷峰网
雷峰网
A
About on SuperTechFans
T
Tenable Blog
F
Full Disclosure
Cyberwarzone
Cyberwarzone
博客园_首页
有赞技术团队
有赞技术团队
K
Kaspersky official blog

一条大河

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

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