I have made a custom form to create nodes for a specific content type. Due to that, I want to throw a 403 or 404 on the admin page that creates new node. The route I mean is 'node/add/'.
I guess in my_module.routing.yml I have to add something like this:
<MY_CUSTOM_ROUTE>.add-node: path: '/node/add/<CONTENT_TYPE>' defaults: _controller: 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'
But I'm not able to find the right controller. Any idea?