サーバー
nginxのrewriteで directive “rewrite” is not terminated by “;” が出る場合
nginxのrewriteディレクティブで、末尾をセミコロン(”;”や”last;”)で終了させているのにも係わらず下記のエラーが出てしまう場合。
directive “rewrite” is not terminated by “;”
正規表現部分をダブルクォーテーション「“」で囲ってやればOK。
これだとエラー:
rewrite ^/archives/[0-9]{12}([0-9]+).php$ http://$host/test.php?hoge=$1 last;
これでOK:
rewrite “^/archives/[0-9]{12}([0-9]+).php$“ http://$host/test.php?hoge=$1 last;
関連記事
2012年05月06日 | Posted in サーバー | No Comments »
コメントを残す