读书人

nginx中重写rewrite的语法异常[emerg]

发布时间: 2013-12-11 16:44:13 作者: rapoo

nginx中重写rewrite的语法错误[emerg] unknown directive
if ( $host != 'www.quxiaoshou.com' ){ rewrite ^(.*)$ http://www.quxiaoshou.com$1 permanent; }

?用^代替空格看起来更清晰:

if^(^$host^!=^'www.quxiaoshou.com'^){?

读书人网 >编程

热点推荐