As far as I'm aware all published content automatically gets assigned a URL. There is a couple of ways to deal with it depending on which you find more preferable:
This was suggested in a different thread (haven't tried it yet but it seems promising). You could write a custom URL provider and set the url manually for certain document types. (link provided in thread: http://24days.in/umbraco/2014/urlprovider-and-contentfinder/)
how to set doctype with no template with no link
how do I make a parent node to not have any url
As far as I'm aware all published content automatically gets assigned a URL. There is a couple of ways to deal with it depending on which you find more preferable:
You could add a custom controller to your project and redirect the user using the response object. (relevant documentation: https://our.umbraco.com/documentation/reference/routing/custom-controllers)
There's also other ways of adding redirects (documentation: https://our.umbraco.com/documentation/reference/routing/URL-Tracking/). Personally we've been using an add-on https://github.com/skybrud/Skybrud.Umbraco.Redirects and it works just great.
This was suggested in a different thread (haven't tried it yet but it seems promising). You could write a custom URL provider and set the url manually for certain document types. (link provided in thread: http://24days.in/umbraco/2014/urlprovider-and-contentfinder/)
The parent node will always have an url. If the page should not be accessed you could set up a redirect for that url, leading to other page.
i would like for the parent node to redirect to # instead. This is my bit of code
is working on a reply...