I have created a custom component with routing that seems to be mostly correct and have now created a module to display multiple items of the component on the homepage.
I have got it to a point where the url is https://www.site.com/component/menu-item/child-menu-item/item-name
If I show a list of items from a menu item then the URL is https://www.site.com/menu-item/child-menu-item/item-name so this is correct.
The thing I am trying to do is remove the /component/ portion of the URL however I can't find where to do this. I have printed out the query variable in my component router file but it doesn't have this segment, its like it is being added before I add my segments in my router.php file.
Is there an easy way to remove the /component/ portion of the url? Please note that the item name will be dynamic as the component is always growing with new pages so I can't have a static re-write of the URL.