Hello. For a multilingual blog you need to build CNC links. There is a physical blog.php page that takes the GET parameter page: /blog.php?page=2 should redirect to / blog / 2

You must write a rule to redirect from other language versions:

/blog.php?page=2 => /blog/2 /ru/blog.php?page=3 => /ru/blog/3 /es/blog.php?page=5 => /es/blog/5 

With this design does not want to work:

 location ~* /^blog{ if ($arg_page = 1) { return 301 $scheme://$host$uri; break; } if ($arg_page ~ ^(\d+)$) { return 301 $scheme://$host$uri/$1; break; } } 
  • In an amicable way, all this should be done not in nginx, but in php code (called routing) - andreymal
  • And why is it specifically noted that this is a blog, is it somehow affected? - PinkTux

0