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 上
}
阅读(801) | 评论(0) | 转发(0) |