Nginx 'rewrite or internal redirection cycle while internally redirecting' resulting in 500

错误提示为 /var/log/nginx/error.log

 

Nginx 'rewrite or internal redirection cycle while internally redirecting' resulting in 500

 

找了好久,怎么改都是无限循环index/

最后发现rewrite这样写就可以了

 if (!-e $request_filename){             

  rewrite ^(.*)$ /index.php?q=$1 last;             

  break;     

posted @ 2015-07-09 16:36  Forward1990  阅读(25862)  评论(0编辑  收藏  举报