hello i was trying add rewrite to the nginx.confg

i delete all url here i dont remmember all the code but i remember this
location / {
try_files $uri $uri/ /index.php?$args;
}
so i put it back
i was trying to add imagify rewrites
location ~* /.+.(jpg|jpeg|jpe|png|gif)$ {
add_header Vary Accept;
if ($http_accept ~* "webp"){
set $imwebp A;
}
if (-f $request_filename.webp) {
set $imwebp "${imwebp}B";
}
if ($imwebp = AB) {
rewrite .* $1.webp;
}
}
but it crash my site when i put it here so i put back the code mentioned before and every thing is back but still it was something more that i cant remember more code or lines i want to set back to default and if u can help me where to put imagify rewrites rule