CodeIgniter nginx 404
默认情况下CI 不支持路由模式需要在server里面配置,配置成如下即可:
server
{
listen 80 ;
server_name wechat.XX.com.cn;
root XX;
index index.html index.php;
location ~ \.php($|/) { fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
} if (!-e $request_filename) {
rewrite "^/(.*)$" /index.php last;
break;
} location /status {
stub_status on;
access_log off;
} location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} access_log /home/wwwlogs/XX/access.log access; }
如此配置下就可以用了
CodeIgniter nginx 404的更多相关文章
- Debian中CodeIgniter+nginx+MariaDB+phpMyAdmin配置
本文不讲述软件安装过程,记述本人在Debia中配置CodeIgniter时遇到的问题及解决方法,希望能够为有需要的人提供帮助. 一.Debian版本及所需的软件 Debian 9.8 stretch ...
- codeigniter nginx rewrite规则配置【转】
转自:http://www.nginx.cn/1134.html nginx如何配置才能支持codeigniter ? 1. codeigniter的url美化去掉index.php 1 2 3 ...
- magento 1.9 nginx 404
原来的nginx 配置 lnmp 环境默认的 location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fast ...
- nginx 404重定向到自定义页面
在访问时遇到上面这样的404错误页面,我想99%(未经调查,估计数据)的用户会把页面关掉,用户就这样悄悄的流失了.如果此时能有一个漂亮的页面能够引导用户去他想去的地方必然可以留住用户.因此,每一个网站 ...
- linux nginx 404错误页面设置
配置nginx 实现404错误 返回一个页面 1.配置nginx.conf 在http代码块 添加 fastcgi_intercept_errors on; 2.在网站的sever代码块 添加 err ...
- Nginx 404 500
Nginx反向代理自定义404错误页面 http中添加 proxy_intercept_errors on; server中添加 error_page 404 = https://www.longda ...
- Nginx 404 Not Found 解决办法
环境:宝塔Nginx面板 解决办法: 宝塔面板--站点设置-配置文件. 去掉: error_page 404 /404.html; 前面的 # 号.
- codeigniter nginx配置
转载:http://www.nginx.cn/1134.html server{ listen 80; server_name www.ci.oa.com; access_log /usr/local ...
- nginx 404 403等错误信息页面重定向到网站首页或其它事先指定的页面
server { listen 80; server_name www.espressos.cn; location / { root html/www; index index.html index ...
随机推荐
- 易语言软件加VMProtect壳的正确方法
VMP是一款很强大的加密壳,代码虚拟化技术可以很好的保护程序不被恶意修改破J但是很多人不知道怎么给自己的程序加壳,今天给大家晋级下加壳的正确方法 相信很多新手都以为只要把软件直接拖到VMP里重新编译一 ...
- mysql数据类型最大长度记录
MySQL中各数据类型的取值范围 转在这里,慢慢记下来. TINYINT -128 - 127 TINYINT UNSIGNED 0 - 255 SMALLINT -32768 - 32767 SMA ...
- vc++ basic chapt1
______API 和SDK _像c程序可以调用各种函数库一样, windows操作系统提供应用程序编程的接口application programming interface简称API函数. 所以主 ...
- jquery 删除数组元素
expertsId.splice($.inArray(thisID.split('&')[0],expertsId),1); 1. expertsId数组名2. thisID.split('& ...
- ios底层网络请求错误码
kCFHostErrorHostNotFound = 1, kCFHostErrorUnknown = 2, // Query the kCFGetAddrInfoFailureKey to get ...
- [算法]树上倍增求LCA
LCA指的是最近公共祖先(Least Common Ancestors),如下图所示: 4和5的LCA就是2 那怎么求呢?最粗暴的方法就是先dfs一次,处理出每个点的深度 然后把深度更深的那一个点(4 ...
- MySQL Batch 与 Transaction
最近在数据库上经常遇到死锁问题. 表现的问题有 1. 有一个查询为: 1) 一个复杂的 select 查处一组大数据 2) 使用事务 update 这组数据的状态 为了让锁定的时间变短, 我将这整个大 ...
- phpcms v9编辑器ckeditor设置回车换行br为段落p标签
phpcms v9和dedecms自带的编辑器都是使用的ckeditor,在默认情况下使用ckeditor编辑内容时,按下回车键后在源代码显示的是<br>而非<p>标签,对于习 ...
- linux桌面环境gnome,kde,xfce,lxde 使用比较(转)
Linus Torvalds大神前几日在 Google+上表示,GNOME 3"无可容忍的凌乱",改投Xfce桌面环境.下面就GNOME, KDE, XFCE和 LXDE略作比较. ...
- linux服务之X windows
gnome display manager :gdm window manager :metacity x-server x-client [root@localhost gdm]# xlsclien ...