Ecstore Nginx Rewrite(去掉链接中的index.php) ECSTORE 伪静态
一、修改 nginx.conf文件,添加如下代码:
if ($request_uri ~ (.+?\.php)(|/.+)$ ){
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
二、修改配置文件:
define('WITH_REWRITE',true);
重启nginx
补充说明
if ($request_uri ~ (.+?\.php)(|/.*)$ ){
break;
}
是为避免当出现类似.../index.php/这种url的时候能够很好的解决502这种情况的发生。
Ecstore Nginx Rewrite(去掉链接中的index.php) ECSTORE 伪静态的更多相关文章
- nginx服务器去掉url中的index.php 和 配置path_info
隐藏index.php server { listen 80; server_name yourdomain.com; root /home/yourdomain/www/; index index. ...
- CI在nginx环境下去掉url中的index.php
在nginx环境下CI框架默认URL规则访问不了,出现500错误,如: http://blog.php230.com/index.php/keywords 今天在服务器配置CI框架环境时,去除URL中 ...
- nginx去掉url中的index.php
使用情境:我想输入www.abc.com/a/1后,实际上是跳转到www.abc.com/index.php/a/1 配置Nginx.conf在你的虚拟主机下添加: location / { ...
- CI去掉 URL 中的 index.php
首先,你要清楚自己的 Web 服务器是 Apache,支持 mod_rewrite 查找httpd.conf中是否开启了mod_rewrite.so 然后,在 CI 根目录下新建立一个配置文件,命名为 ...
- ThinkPHP去掉URL中的index.php
我的环境是apache+ubuntu 1,先确认你有没mod_rewrite.so模块 /usr/lib/apache2/modules/mod_rewrite.so 然后在httpd.conf最后一 ...
- vue去掉链接中的#
在router.js中修改, const router = new VueRouter({ mode: 'history', routes: [...] })
- Nginx Rewrite详解
Nginx Rewrite详解 引用链接:http://blog.cafeneko.info/2010/10/nginx_rewrite_note/ 原文如下: 在新主机的迁移过程中,最大的困难就是W ...
- Nginx Rewrite研究笔记
原文出自:http://blog.cafeneko.info/2010/10/nginx_rewrite_note/ 在新主机的迁移过程中,最大的困难就是WP permalink rewrite的设置 ...
- ThinkPHP 隐藏URL中的 index.php
去掉 URL 中的 index.php 通常的URL里面含有index.php,为了达到更好的SEO效果可能需要去掉URL里面的index.php ,通过URL重写的方式可以达到这种效果,通常需要服务 ...
随机推荐
- UVA 11054 Wine trading in Gergovia(思维)
题目链接: https://vjudge.net/problem/UVA-11054 /* 问题 输入村庄的个数n(2=<n<=100000)和n个村庄的数值,正代表买酒,负代表卖酒,k个 ...
- POJ 1002 487-3279(map映照容器的使用)
Description Businesses like to have memorable telephone numbers. One way to make a telephone number ...
- Spring基础(9) : 自动扫描
一 配置xml方式:扫描com包下的bean <?xml version="1.0" encoding="UTF-8" ?> <beans ...
- C++ 小知识点 WINAPI
int WINAPI WINMain 中,WINAPI含义 网友给出回答:在windef.h头文件中有如下定义#define WINAPI __stdcall#define APIENTRY ...
- Vue: 生命周期, VueRouter
Vue实例的生命周期: beforeCreate: 实例创建之前除标签外,所有的vue实例需要的数据,事件都不存在 created: 实例被创建之后,data和事件已经被解析到,el还没有找到 ...
- JS简单验证
1.验证是否全为数字 2.验证邮箱 3验证手机号 4.验证身份证号 5.验证时间格式 下面是代码,可直接用,有注释 <html> <meta charset="utf-8& ...
- layui的checkbox示例
1.html页面: var isSkipcheckbox = ''; if (appOptions.isSkip != "0") { isSkipcheckbox = 'check ...
- js-ES6学习笔记-Class(2)
1.与函数一样,类也可以使用表达式的形式定义. const MyClass = class Me { getClassName() { return Me.name; } }; 这个类的名字是MyCl ...
- 【代码笔记】iOS-播放从网络上下载的语音
代码: ViewController.m #import "ViewController.h" //录音 #import <AVFoundation/AVFoundation ...
- iostart 命令
Linux系统中的 iostat命令可以对系统的磁盘IO和CPU使用情况进行监控.iostat属于sysstat软件包,可以用yum -y install sysstat 直接安装. 格式: iost ...