Chinaunix首页 | 论坛 | 博客
  • 博客访问: 937814
  • 博文数量: 245
  • 博客积分: 11429
  • 博客等级: 上将
  • 技术积分: 2662
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-15 00:16
文章存档

2011年(56)

2010年(174)

2009年(15)

分类: LINUX

2010-08-27 13:11:38

server {
    listen       80;
    server_name 
    index index.html index.htm index.php;
    root  /website/www; 
error_page 404 500 502 503 504 http://  将404 这几个错误重定向到 这

个域名上
  
   if ($host ~ "bbs1\.abd\.com") {
           rewrite ^(.*) permanent;
          }
  将请求bbs1\.abd\.com 重定向到 的域名上
 RewriteCond %{HTTP_HOST}        ^tuan\.aa\.com$
 RewriteRule ^(.+)      %{HTTP_HOST}$1  [C]
 RewriteRule ^tuan\.aa\.com/$  /website/web/www/groupbuy_list.php  [L]
 将访问tuan.aa.com 重定向到 website 这个目录下的groupbuy_list.php 上
   ##servername chong ding xiang
   #  rewrite ^/(.*) /$1 last;  这个是将所有请求转到 后面bbs.aa.com上

   #     rewrite ^/(.*) /test.php last;  将所有请求重定向到 test.php 上

阅读(768) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~