Chinaunix首页 | 论坛 | 博客
  • 博客访问: 642326
  • 博文数量: 198
  • 博客积分: 4256
  • 博客等级: 上校
  • 技术积分: 1725
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-15 13:12
文章分类

全部博文(198)

文章存档

2012年(12)

2011年(39)

2010年(135)

2009年(12)

我的朋友

分类: LINUX

2010-08-17 21:09:19

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;
阅读(1779) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~