nginx 301 跳转配置

单调的低调 2015-04-09

server{

listen80;

server_namexxx.com;

indexindex.phpindex.htmlindex.shtmlindex.htm;

root/eetop/nginx/out_hibeauty;

return301http://test.com;

location/{

try_files$uri$uri//index.php?$args;

}

location~.*\.(php)?$

{

expires-1s;

try_files$uri=404;

fastcgi_split_path_info^(.+\.php)(/.+)$;

includefastcgi_params;

fastcgi_paramPATH_INFO$fastcgi_path_info;

fastcgi_indexindex.php;

fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;

fastcgi_pass127.0.0.1:9000;

#fastcgi_passunix:/var/run/phpfpm.sock;

#php-fpm.conflisten=/var/run/phpfpm.sock##

}

error_page500502503504/50x.html;

location=/50x.html{

rootout_hibeauty;

}

}

相关推荐