Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Root URL Classname Conflict

Go to End

2 Posts   802 Views


Community Member, 1 Post

8 January 2013 at 10:03am

Our site is using SS 2.4, and we're preparing to migrate to 3.0. Our information architecture design has caused us to hit the limitation for root URLs that they cannot be the same as a class name for one of our root URLs. Just wondering if you could give any background on why this limitation is imposed, this will help me determine the best way to work around it.

Thank you very much for your help, and thank you for your tremendous work on this product.


Forum Moderator, 5523 Posts

10 January 2013 at 5:58pm

The urls in SilverStripe are controlled by routes. You would have seen Director::addRules() and routes.yml files around the place / mentioned in the tutorials. One of these core routes built in is for $ClassName to access the controller class (e.g Security/login goes to Security controller). Normally you have your controllers named FooController or BarController so conflicts are unlikely but you could setup your routes so that the given url you want has a higher priority than the built in route.