Nginx system how to write 301redirect to access the former is not 404 pages but can open the latter?

Nginx system, how to write 301redirect to:
Baodu123.com/bd/964.html
jump to:
Baodu123.com/bd/964
and visit the former not 404 pages, but the latter can be opened.

Apr.01,2021
Menu