Chinaunix首页 | 论坛 | 博客
  • 博客访问: 446561
  • 博文数量: 481
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1040
  • 用 户 组: 普通用户
  • 注册时间: 2013-01-06 14:09
文章分类

全部博文(481)

文章存档

2013年(483)

我的朋友

分类: LINUX

2013-02-28 12:43:49

原文地址:nginx URL rewrite 实例 作者:jack_sir

nginx url跳转

1、

        if ($request_uri !~ ^/tg/001) {
                rewrite ^.*$ /tg/001/index.html permanent;
        }


2、

        if ($request_filename !~ "(client\.php)|(\.(js|ico|gif|jpg|png|css))$") {
                rewrite ^.*$ /index.php last;
        }


3、图片服务器URL重写:

rewrite ^(.*)/u/([0-9]+)x([0-9]+)/([0-9]+)/(.*) $1/image.php?width=$2&height=$3&db_no=$4&filename=$5 last;


4、
rewrite ^/soft/([\d]+-[\d]+-[\d]+)/([\d]+)\.html$ /soft/network/apply/$1/$2.html last;
阅读(247) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~