VPS侦探论坛
标题:
多个域名指向一个域名的纠结301问题
[打印本页]
作者:
uckk
时间:
2011-6-20 14:17
标题:
多个域名指向一个域名的纠结301问题
server
{
listen 80;
server_name 421351.com
www.421351.com
qqape.com
www.qqape.com
text.hy150.com;
index index.html index.htm index.php;
root /home/wwwroot/421351.com;
include dede.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/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;
}
各位,这么多域名全指向
www.421351.com
怎么写法啊?,试了好多方法,行不通
作者:
licess
时间:
2011-6-20 14:27
https://bbs.vpser.net/viewthread.php?tid=2117
多域名server_name里,空格分开
作者:
uckk
时间:
2011-6-20 14:44
server
{
listen 80;
server_name
www.421351.com
;这里是这样写的吧.呵呵
index index.html index.htm index.php;
root /home/wwwroot/421351.com;
include dede.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/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;
}
server {
server_name 421351.com qqape.com
www.qqape.com
text.hy150.com;
rewrite ^(.*)
http://www.421351.com$1
permanent;
}
作者:
uckk
时间:
2011-6-20 14:45
应该是这样写的
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4