A client asks me to redirect an old URL to a new one. Only, the URL it gives me contains a parameter and it is impossible to do a .htaccess redirect with that. I tested and I did not succeed.
I would like to redirect with the Laravel route system.
I tried this :
Route::get('places.php?p=1740', function () {
return redirect('new/url');
});
But I have the same problem. I have a 404 error that the page does not exist. I tried without the parameter and it works.
I also tried this:
Route::get('places.php/{p}', function ($p = '1740') {
return redirect('new/url');
});
But it does not work either.
I just need a solution that works to redirect his url with a parameter to a new one.
Thank you !