So at the moment this is working for me:
if ($request_uri = "/web/news.php?id=69") {
rewrite ^ https://www.camper-center.ch/? last;
}
But now I also have URLs like /web/listing.php?monat=02&jahr=2020
with two Parameters instead of one like above.
if ($request_uri = "/web/listing.php?monat=02&jahr=2020") {
rewrite ^ https://www.camper-center.ch/news/aktuell.html?month=02&year=2020? last;
}
this doesn't seem to work. Do you have any suggestions?
Since it redirected me to the site with german parameters, I redirected them and it worked like this for me in the end:
if ($request_uri = "/news/aktuell.html?monat=02&jahr=2020") {
rewrite ^ https://www.camper-center.ch/news/aktuell.html?month=02&year=2020? last;
}