新建站点 添加301转向 不能用,以前的可以
[i=s] 本帖最后由 bluegua 于 2011-11-21 17:21 编辑 [/i]原来是我的域名解析有问题~:(
[code]server {
listen 80;
server_name www.aitpc.com;
root /www/web/aitpc/public_html;
index index.html index.php index.htm;
error_page 404 /errpage/404.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
}
server {
server_name aitpc.com;
rewrite ^/(.*)$ http://www.aitpc.com$1 permanent;
} [/code] 这是另一个,却可以用[code]server {
listen 80;
server_name www.htcwp.com;
root /www/web/weizhi/public_html;
index index.html index.php index.htm;
error_page 404 /errpage/404.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
}
server {
server_name htcwp.com;
rewrite ^/(.*)$ http://www.htcwp.com$1 permanent;
} [/code]
页:
[1]