nginx配置phpcms v9伪静态规则 phpcms伪静态 404 Not Found
location / {
if (!-f $request_filename){
rewrite (.*) /index.php;
}
rewrite ^/caipu-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3 last;
rewrite ^/content-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3 last;
rewrite ^/list-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=lists&catid=$1&page=$2 last;
rewrite ^/tag-([^\.]*)-([0-9]+)-([0-9]+).html /index.php?m=content&c=tag&catid=$2&tag=$1&page=$3 last;
rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=comment&c=index&a=init&commentid=content_$1-$2-$3 last;
rewrite ^/([^\.]*).html /index.php?m=member&c=index&a=$1 last;
}
以上规则有一些问题 ,请测试使用
下面是我自己写的:
可以正常使用
location / {
###以下为PHPCMS 伪静态化rewrite法则
rewrite ^/(.*)content-([0-9]+)-([0-9]+)-([0-9]+)\.html /index.php?m=content&c=index&a=show&catid=$2&id=$3&page=$4;
rewrite ^/(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=show&catid=$2&id=$3&page=$4;
rewrite ^/(.*)list-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=lists&catid=$2&page=$3;
}


nginx配置phpcms v9伪静态规则 phpcms伪静态 404 Not Found的更多相关文章
- PHPCMS V9 加密规则
PHPCMS V9 加密规则 相关表:v9_admin 加密方式: md5(md5(password)+encrypt) 第一步:对输入的密码32位小写 MD5 对输入的密码进行trim过滤 第二 ...
- Nginx配置location及rewrite规则
Nginx配置location及rewrite规则 示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] } loca ...
- nginx配置 location及rewrite规则详解
1. location正则写法 语法规则: location [=|~|~*|^~] /uri/ { … } = 开头表示精确匹配 ^~ 开头表示uri以某个常规字符串开头,理解为匹配 url ...
- nginx配置location与rewrite规则教程
location 教程 location 教程 示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] }location / { ...
- nginx配置中location匹配规则详解
一.概述 nginx官方文档给出location语法如下: 1 location [=|~|~*|^~] uri { … } 其中,方括号中的四种标识符是可选项,用来改变请求字符串和uri的匹配方式. ...
- Nginx配置location跳转后偶尔出现404
tv.xxx.com/voice请求时需跳转至:tv.xxx.com/zongyi/zt2015/haoshengyin/index.shtml 目录结构: nginx服务器配置: location ...
- Nginx伪静态配置和常用Rewrite伪静态规则集锦
伪静态是一种可以把文件后缀改成任何可能的一种方法,如果我想把php文件伪静态成html文件,这种相当简单的,下面我来介绍nginx 伪静态配置方法 nginx里使用伪静态是直接在nginx.conf ...
- [转]Nginx伪静态配置和常用Rewrite伪静态规则集锦
Nginx伪静态配置和常用Rewrite伪静态规则集锦 作者: 字体:[增加 减小] 类型:转载 时间:2014-06-10 我要评论 伪静态是一种可以把文件后缀改成任何可能的一种方法,如果我想把ph ...
- PHPCMS v9 在windows2008系统 IIS7 下设置伪静态的方法
安装环境:windows2008+IIS7.0+PHP5+MYSQL5 一.安装phpcms v9程序,设置伪静态.如图: 二.安装IIS7官方Url重写模块 1.先到IIS官方下载模块 下载地址:h ...
- phpcms v9会员中心文件上传漏洞
漏洞版本: phpcms v9 漏洞描述: PHPCMS V9采用OOP(面向对象)方式自主开发的框架.框架易扩展,稳定且具有超强大负载能力. phpcms v9会员中心上传头像处可未经过充分过滤,攻 ...
随机推荐
- vue项目如何配置路由
vue3项目中如何配置路由 1.下载vue-router,在路由文件中引入相关依赖 import {createRouter,createWebHashHistory} from 'vue-route ...
- cmd 下运行pyhon文件.py
第一步: wind+R打开[运行],输入cmd,点击确定 第二步: ①输入:[cd]指定pyhon文件目录 ② cd C:\Users\pc\Desktop\test ③在指定目录下输入pyhon文件 ...
- uc 小游戏接入经验
使用引擎,egret 相关资料: https://blog.csdn.net/weixin_42276579/article/details/107379544 https://minigame.uc ...
- The Ultimate Guide to Dynamics 365 Pricing and Licensing
Microsoft Dynamics 365 integrates powerful ERP and CRM capabilities in the cloud to provide busi ...
- 持续集成环境(2)-Jenkins插件管理
Jenkins本身不提供很多功能,我们可以通过使用插件来满足我们的使用.例如从Gitlab拉取代码,使用 Maven构建项目等功能需要依靠插件完成.接下来演示如何下载插件. 修改Jenkins插件下载 ...
- easycode模版-基于ruoyi-cloud
##定义初始变量 #set($tableName = $tool.append($tableInfo.name, "Controller")) ##设置回调 $!callback. ...
- ffmpeg的常用参数
-encoders 查看支持的编码器 Intel处理器的核心显卡支持的编码器带有qsv后缀(Intel quick sync video acceleration) NVIDIA独立显卡 ...
- linux查看已知进程PID所在的目录
pwdx 命令 pwdx PID [was@CMTRMWAS1 ~]$ pwdx 31996 31996: /was/AppServer/profiles/AppSrv03
- MySQL:查询语句 case when then 的用法
转载网址: https://blog.csdn.net/h123hlll/article/details/122366213
- 一文快速回顾 Session 和 Cookie
前言 在 Web 应用程序中(通俗点,可以理解成一个网站),Session 和 Cookie 是两个非常重要的概念,主要用于实现用户身份认证.数据传递等功能.今天就来讲讲这两个东西. 对于当时刚开始接 ...