Tuesday, March 7, 2017

If I include the file extension name (ex: png) with dot(.) in the routes at real server, the query parameters are not passed

I'm used laravel framework(5.2), nginx.

If I include the file extension name (ex: png) with dot(.) in the routes at real server, the query parameters are not passed. But if I use local server, working very well.

Below sample code

// routes.php 
// with `dot(.)` and `png` name
Route::get('auto.png', 'AutoController@autoPng');

// Controllers
public function autoPng(Request $request){
    $params = $request->all();
    var_dump($params);
}

// sample URL
test.com/auto.png?t1=dd

// result
// real server
array(0) { }
// local server
array(1) { ["t1"]=> string(2) "dd" }



via Kwan Ung Park

Advertisement