Redirect to project subpage URL by project id

Currently, when opening a URL by project id (e.g. https://gitlab.example.com/projects/123456) we will be redirected to URL with full project path (e.g. https://gitlab.example.com/path/to/my/project).

But when we want to open a subpages (e.g. https://gitlab.example.com/projects/123456/-/blob/master/Makefile), the redirect is not executed, we get 404.

It would be nice to have such redirect for all project subpages (Pipelines, Blobs, Commits, Branches, etc). This is convenient for external integrations with Gitlab for generating links by project id, because the project path can change over time, but the project id is constant.

Edited by Alexander Alexandrov