how to create url slug with certain words(root directory names) excluded?
<p>I am allowing my website user's to specify their own slug for the page they create for better seo purpose.
 what I am trying to do is I want to restrict the user from specifying the directory names present in the root. e.g. I am having dir with name 'abc' then user should not be able to use this name as slug e.g. www.mywebsite.com/abc should be flagged as invalid because 'abc' is directory name present at my project root level. what could be the good approach for avoiding root directory names as slug?</p>
