Laravel 5.1/nginx
nginx site routing
location / { try_files $uri $uri/ /index.php$query_string; }
laravel routing settings:
... Route::get('/shops/search ' 'ShopsController@search '); ...
Problems:
http://site.app/shops/search This is normal
http://site.app/shops/search?... A 404 error occurs, any parameter is 404
Please tell me how to set it up? The search page has many parameters, keyword is just one of them. The above use of a keyword is just an example, so I only plan to use it as a Query string for access
Laravel 5.1/nginx
nginx site routing
location / { try_files $uri $uri/ /index.php$query_string; }
laravel routing settings:
... Route::get('/shops/search ' 'ShopsController@search '); ...
Problems:
http://site.app/shops/search This is normal
http://site.app/shops/search?... A 404 error occurs, any parameter is 404
Please tell me how to set it up? The search page has many parameters, keyword is just one of them. The above use of a keyword is just an example, so I only plan to use it as a Query string for access
location is written wrong. There is a missing ? symbol
The correct one is as follows:
location /{ try_files $uri $uri/ /index.php?$query_string; }