Custom post type should have below settings:
‘rewrite’ => false,
‘query_var’ => false,
‘publicly_queryable’ => false,
‘public’ => false
Explanation of each:
rewriteTriggers the handling of rewrites for this post type. To prevent rewrites, set to false.
query_var‘false’ – Disables query_var key use. A post type cannot be loaded at /?{query_var}={single_post_slug}
publicly_queryableWhether queries can be performed on the front end as part of parse_request().
public‘false’ – Post type is not intended to be used publicly and should generally be unavailable in wp-admin and on the front end unless explicitly planned for elsewhere.
Go to Permalinks Settings and without changing anything – save change. It will rebuild your “routing”.
Source: https://stackoverflow.com/questions/19747096/remove-url-structure-for-custom-post-type