zuoqz 发表于 2012-8-14 17:55:35

请教一个nginx 301重定向的问题!

以下是:www.aaa.net.conf
server

{

listen       80;

server_name www.aaa.cn aaa.cn www.aaa.net aaa.net;

index index.php index.html index.htm default.html default.htm default.php;

root/home/wwwroot/www.ruantui.net;


include other.conf;

location ~ .*\.(php|php5)?$

{

try_files $uri =404;

fastcgi_passunix:/tmp/php-cgi.sock;

fastcgi_index index.php;

include fcgi.conf;

}


location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

{

expires      30d;

}


location ~ .*\.(js|css)?$

{

expires      12h;

}


access_log off;

}


现在我想将 aaa.cn www.aaa.net aaa.net; 全部重定向到www.aaa.cn应该如何操作?
新手,请详细解答,谢谢!

[ 本帖最后由 zuoqz 于 2012-8-14 17:57 编辑 ]

zuoqz 发表于 2012-8-14 17:57:39

是不是需要重新在服务器上建一个网站,还是可以直接在这个网站上改?
页: [1]
查看完整版本: 请教一个nginx 301重定向的问题!