ngnix站内配置伪静态
来源:互联网 发布:手机mac addr 编辑:程序博客网 时间:2024/06/18 04:55
server {
listen 80;
server_name www.haojieshao.net ;
index index.html index.htm index.php;
root /alidata/www/haojieshao/;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
//添加这块
location /
{
if (!-e $request_filename)
{
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
//添加这块END
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 3d;
}
location ~ .*\.(js|css)?$
{
expires 3h;
}
listen 80;
server_name www.haojieshao.net ;
index index.html index.htm index.php;
root /alidata/www/haojieshao/;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
//添加这块
location /
{
if (!-e $request_filename)
{
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
//添加这块END
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 3d;
}
location ~ .*\.(js|css)?$
{
expires 3h;
}
}
主要是添加这块,就可以站内配置伪静态了。
0 0
- ngnix站内配置伪静态
- ngnix静态资源访问配置
- ngnix静态资源访问配置
- isapi_rewrite3 实现站内任意动态页伪静态
- Apache配置伪静态
- IIS伪静态配置
- URLRewriter配置伪静态
- apache 伪静态配置
- 伪静态配置
- PHP伪静态配置
- apache配置伪静态
- MVC 伪静态配置
- apache伪静态配置
- nginx 配置伪静态
- 配置PHPCMS伪静态
- Nginx伪静态配置
- PHP伪静态配置
- 伪静态配置开启
- Guice 学习(八)AOP (面向切面的编程)
- jquery跨域get请求问题解决
- magento 首页调用指定ID产品
- C++ 模板详解
- 理解矩阵(三)
- ngnix站内配置伪静态
- Java智能卡基础篇
- Flume NG 简介及配置实战
- 使用日历javascript插件
- thinkPHP多表联合查询
- Core Python Notes
- 安装OpenCV:OpenCV 2.4.8 +VS2010 开发环境配置(Win7)
- Storm安装记录
- Java数据结构(四):线性表之双向链表