How does WordPress do this to URL?

for example, WordPress"s Chinese official website: https://cn.wordpress.org, I add a few slashes to this URL, so: https://cn.wordpress.org/, it will automatically jump to the normal URL.

segmentfault.com

do any great gods know how this is achieved?

Mar.21,2021

has solved it on its own.
this effect is divided into servers. In IIS, Nginx has the effect mentioned in the problem only because the PHP cannot be obtained from the URL and / or cannot be realized. The specific implementation is implemented in PHP.

Menu