博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
wdcp nginx pathinfo rewrite 设置
阅读量:7031 次
发布时间:2019-06-28

本文共 1365 字,大约阅读时间需要 4 分钟。

hot3.png

wdcp的nginx设置 使其支持pathinfo和隐藏index.php 

server {        listen       80;        root /www/web/test;        server_name www.test.com;        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;        error_page  503 /errpage/503.html;        location ~ \.php(.*)$ {                fastcgi_pass  unix:/tmp/php-55-cgi.sock;                fastcgi_index  index.php;                fastcgi_param  SCRIPT_FILENAME  $DOCUMENT_ROOT$fastcgi_script_name;                fastcgi_param PATH_INFO $2;                include fcgi.conf;				set $path_info "";				set $real_script_name $fastcgi_script_name;				if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {				set $real_script_name $1;				set $path_info $2;				}				fastcgi_param SCRIPT_NAME $real_script_name;				fastcgi_param PATH_INFO $path_info;        }        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {                expires      1d;        }        location ~ .*\.(js|css|html|htm)?$ {                expires      12h;        }        location ~ /\.ht {                deny  all;        }        location / {                 try_files $uri $uri/ /?$args;        }        if (!-e $request_filename) {		   rewrite  ^(.*)$  /index.php?s=$1  last;		   break;		}}

 

转载于:https://my.oschina.net/u/2338463/blog/1841477

你可能感兴趣的文章
安装pytorch成功但cuda不可用
查看>>
unity__DrawCall的理解
查看>>
springboot架构下运用shiro后在configuration,通过@Value获取不到值,总是为null
查看>>
SQLServer 数据库镜像+复制切换方案
查看>>
Postman初探
查看>>
仿淘宝头像上传功能(一)——前端篇。
查看>>
Eclipse通过集成svn实现版本控制
查看>>
OS开发过程中常用开源库
查看>>
关于在多个UItextield切换焦点
查看>>
hdu 2768
查看>>
git记住用户名密码
查看>>
ElasticSearch(2)-安装ElasticSearch
查看>>
从mysql数据表中随机取出一条记录
查看>>
ORACLE 锁表处理,解锁释放session
查看>>
深海机器人问题
查看>>
正则表达式(括号)、[中括号]、{大括号}的区别小结
查看>>
88.NODE.JS加密模块CRYPTO常用方法介绍
查看>>
java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes
查看>>
asp.net 连接 oracle10g 数据库
查看>>
C 入门 第十一节
查看>>