关于301的问题
主机不加IP的时候用;server {
server_name 114466.cn;
rewrite ^(.*) http://www.114466.cn$1 permanent;
}
定向成功,加了IP就不起作用了,请问是什么问题?
server
{
listen 184.82.6.22:80;
server_name www.114466.cn;
回复 1# 的帖子
改成listen 80; 老大还是不行,也重启过了server
{
listen 184.82.6.35 80;
server_name www.cu25.info;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/www.cu25.info;
include none.conf;
location ~ .*\.(php|php5)?$
{
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;
}
server {
server_name cu25.info;
rewrite ^(.*) http://www.cu25.info$1 permanent;
} 麻烦军哥看看!!!! 军哥一直没有解决,麻烦看看!
回复 5# 的帖子
server {listen 80;
server_name cu25.info;
rewrite ^(.*) http://www.cu25.info$1 permanent;
}
再 /usr/local/nginx/sbin/nginx -t 看一下 the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
老大,是这个提示
listen 80;
这里加上IP好像就OK了!
页:
[1]