1. location /{
    2. if (!-e $request_filename){
    3. rewrite ^(.*)$ /index.php?r=$1 last; break;
    4. }
    5. }