静态地址http://test.dev/search_sw_20_p_1.html

动态地址http://test.dev/television/Search?searchword=20&page=1


1、location / {
          index index.php;
   rewrite ^/search_sw_([^_]*)(_p_)?(\d*).html /index.php?/television/search&searchword=$1&page=$3 last;
  }

2、set $real_request_uri $request_uri;
        if ($request_uri ~ ^/search_sw_([^_]*)(_p_)?(\d*).html) {
            set $real_request_uri  /television/search?searchword=$1&page=$3;
        }

3、location ~ \.php$ {
    fastcgi_param  REQUEST_URI   $real_request_uri;
    include        fastcgi_params;
  }

4、vi fastcgi_params;
  # fastcgi_param  REQUEST_URI        $request_uri;