Nginx的Z-Blog的伪静态配置方法

所属分类: CMS教程 / z-blog 阅读数: 2092
收藏 0 赞 0 分享
本站是在LNMP环境下运行,参考Nginx的Z-Blog的静态配置



复制代码
代码如下:

server {
listen 80;
server_name jb51.net blog.jb51.net www.jb51.net;
root /www/web/www_jb51_net/public_html;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
location ~ \.php$ {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
#include ./rewrite/z-blog_nginx.conf;
rewrite ^/post/([0-9]+).html$ /index.php?id=$1 last;
rewrite ^/([0-9]+).html$ /index.php?id=$1 last;
rewrite ^/(?:page_)?([0-9]*).html$ /index.php?page=$1 last;
rewrite ^/category-([0-9]+)(?:_)?([0-9]*).html$ /index.php?cate=$1&page=$2 last;
rewrite ^/date-([0-9-]+)(?:_)?([0-9]*).html$ /index.php?date=$1&page=$2 last;
rewrite ^/author-([0-9]+)(?:_)?([0-9]*).html$ /index.php?auth=$1&page=$2 last;
rewrite ^/tags-([0-9]+)(?:_)?([0-9]*).html$ /index.php?tags=$1&page=$2 last;
}
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
}

更多精彩内容其他人还在看

zblog2.2实现首页显示指定的分类技巧

zblog2.2的技巧下文分享给大家
收藏 0 赞 0 分享

Z-Blog 使用Tmt主题时修改底部版权的方法

这篇文章主要介绍了Z-Blog 使用Tmt主题时修改底部版权的方法,需要的朋友可以参考下
收藏 0 赞 0 分享

Nginx的Z-Blog的伪静态配置方法

这篇文章主要介绍了Nginx的Z-Blog的伪静态配置方法,需要的朋友可以参考下
收藏 0 赞 0 分享

zblog不显示表情的解决方法

关键字描述:方法 解决 表情 显示 文件 评论 程序 zblog ZBLOG JS 一位网友问我:zblog程序评论不显示表情该怎么办?,自己摸索了下,能够影响zblog程序评论表情不显示的大致有这么3个地方。 1、zblog模版文件 single.htm ,有段JS(
收藏 0 赞 0 分享

Z-blog自定义标签使用教程

关键字描述:教程 使用 标签 定义 < " > pclass 日期 CSS <!--自定义的标签--> <!--AD <divclass="function"id="divZAD">
收藏 0 赞 0 分享

z-blog简洁翻页条的CSS定义

关键字描述:定义 简洁 < 模板 文件 &rdquo &ldquo 如何 对应 留言 其中“更早的文章”和“之后的文章”分别由span标签的pagebar-previous和pagebar-next类定义,你可以用CSS
收藏 0 赞 0 分享

z-blog的目录、留言、引用标签教程

关键字描述:标签 教程 引用 留言 目录 < " /h3> ul> /ul> <!--网站目录 <divclass="function"id="divCatalog"> <h3
收藏 0 赞 0 分享

Z-Blog常用标签说明

关键字描述:说明 标签 常用 < " > id /h3> /ul> h3> <!--文章归档 <divclass="function"id="divArchives"> <h3
收藏 0 赞 0 分享

Z-Blog文章列表区标签与特殊标签说明

关键字描述:标签 说明 特殊 文章 < default.html catalog.html 文章列表区 多页排列的分页条: <#template:pagebar#>:由default.html和catalog.html引用 <#pageb
收藏 0 赞 0 分享

Z-Blog日历标签与控制面板标签说明

关键字描述:标签 说明 面板 控制 日历 < " > /div> /h3> <!--日历标签 <divclass="function"id="divCalendar"> <h3
收藏 0 赞 0 分享
查看更多