This is how Sitecore works with item resolving. It will resolve via Item Name or Display Name. Setting the useDisplayNames
in the LinkProvider
will have zero effect on how Sitecore resolves the item names.
In the ItemResolver
the code calls tries to resolve the item by the Item Name
first, then if it can't do that it calls this method:
this.ResolveUsingDisplayName(args);
Which will resolve using the display name. The only way to change that would be to roll your own ItemResolver
and patch that in, instead of the default one. Then you could remove the extra call to this.ResolveUsingDisplayName(args);
and let the Item resolution fail which would give the page not found error.
Alternative Option
If you are worried about this because of SEO dilution, you can simply make sure that each page as a Canonical Url meta tag set to the url created via the item name. This would make sure that any search engines see both urls as the same page and the SEO importance would not be diluted.