Nginx如何配置隐藏index.php文件
server
{
listen 80;
#listen [::]:80 default_server ipv6only=on;
server_name jiqing.dexin.com;
index index.html index.htm index.php admin.php;
root /home/wwwroot/default/dexin/dragon/public; #error_page 404 /404.html;
include enable-php-pathinfo.conf; location /nginx_status
{
stub_status on;
access_log off;
} location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} location ~ /\.
{
deny all;
}
/* 起作用
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
*/
access_log /home/wwwlogs/access.log;
}
Nginx如何配置隐藏index.php文件的更多相关文章
- nginx下重写隐藏index.php文件
location / { root /项目目录/; index index.php; if (-f $request_filename/index.php){ rewrite (.*) $1/inde ...
- Yii2.0简单隐藏index.php文件和模块配置和layout布局配置禁用和日志写入配置
隐藏index.php文件 目的:想去掉浏览器地址栏中的 index.php?r= 这一块. 在/config/web.php中 ’components'=>[] 中添加如下代码: 'u ...
- Yii Framework隐藏index.php文件的步骤
Yii Framework隐藏index.php文件的步骤 作者:feebas 发布于:2012-4-23 13:36 Monday 分类:Yii Framework 1.开启apache的mod_r ...
- nginx配置隐藏index.php
Nginx 服务器隐藏 index.php 配置 location / { try_files $uri $uri/ /index.php?$query_string; } nginx配置中t ...
- PHPStudy+PHPStorm下配置隐藏项目入口文件
img { max-width: 100% } 默认情况下项目入口文件是站点根目录下index.php文件,一般程序启动时通过这个文件,定义文件路径,配置重要节点(比如是否开启调试模式),注册路由等, ...
- Nginx 安装配置【必须把文件到放到机器上】
[必须把所有下载的gz文件到放到机器上:编译] 1.安装nginx之前的编译软件 yum -y install make zlib zlib-devel gcc-c++ libtool openss ...
- nginx 环境 thinkphp 隐藏index.php
tp官网已经写了 http://doc.thinkphp.cn/manual/hidden_index.html 不生效 重启nginx .问题依旧 kill掉nginx进程 再启动 贴段自己的配置 ...
- nginx下Thinkphp 隐藏index.php
thinkphp config配置: 'URL_MODEL' => '2', //URL模式 nginx rewrite配置: location / { if (!-e $request_fil ...
- 记录 nginx和php安装完后的URL重写,访问空白和隐藏index.php文件的操作方法
sudo cd /etc/nginx/; sudo vi fastcgi_params; 1.URL重写 如果你的url参数不是用?xxx传递,而是自定义的,比如用/xx/xx/xx的方式传递,那么在 ...
- nginx 配置隐藏index.php效果
location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; } } 完整如下 server { li ...
随机推荐
- openstack中Nova组件简解
一.Nova组件概述 计算节点通过Nova Computer进行虚拟机创建,通过libvirt调用kvm创建虚拟机,nova之间通信通过rabbitMQ队列进行通信. Nova位于Openstack架 ...
- FR801xH开发
一.空间分配 二.代码流程 1)user_custom_parameters 函数 __jump_table 结构体中保存了一些配置信息: void user_custom_parameters(vo ...
- 小结event.target与this
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <t ...
- Python实践项目——LSB隐写术
此为北京理工大学某专业某学期某课程的某次作业 一.项目背景 1.隐写术 隐写术是一门关于信息隐藏的技巧与科学,所谓信息隐藏指的是不让除预期的接收者之外的任何人知晓信息的传递事件或者信息的内容. 2.L ...
- 重复造轮子 SimpleMapper
接手的项目还在用 TinyMapper 的一个早期版本用来做自动映射工具,TinyMapper 虽然速度快,但在配置里不能转换类型,比如 deleted 在数据库中用 0.1 表示,转换成实体模型时没 ...
- Java SE final关键字
final关键字 final可以修饰类.属性.方法和局部变量 如下情况,可以使用final 当不希望类被继承时,可以用final修饰 当不希望父类的某个方法被子类覆盖/重写(override)时,可以 ...
- K8S Ingress使用|常见问题列表
官方文档地址:https://kubernetes.github.io/ingress-nginx/
- 基于python的端口扫描
前言 端口扫描是指某些别有用心的人发送一组端口扫描消息,试图以此侵入某台计算机,并了解其提供的计算机网络服务类型(这些网络服务均与端口号相关).端口扫描是计算机解密高手喜欢的一种方式.攻击者可以通过它 ...
- c#-03关于类和继承的基本知识
一.类继承 通过类继承可以定义一个新类,新类纳入一个已经声明的类进行扩展 已经存在的类叫做基类,而通过继承出的类叫做派生类,派生类的组成为: 本身声明中的成员 基类的成员 派生类无法删除基类成员,但可 ...
- 「Tubian」Tubian0.4!完全开源!
Tubian是我自己维护的Linux发行版.Tubian基于Debian,提供了开箱既用的Wine和Waydroid,装好就有对Android应用和Windows程序的兼容. Sourceforge. ...