22477 Posts in 7058 Topics by 2752 members
|Go to End|
25 October 2012 at 12:44am
I'm trying to create a page with the url domain.xy/upload. Admin-Backend won't let me create this url, always replacing it by upload-2. If i call domain.xy/upload, I get a Silverstripe introduction page. Tested this on two different 3.0.1 installations.
How can I create a page on /upload?
Thx for any help!
25 October 2012 at 6:13am
I think that might have something to do with Upload being a Controller class. Try adding a page with the strange URL 'AdminRootController' - that too will result in -2 being added. You just can't have pages that have the same URL as Controller classes...
Same thing with actions, I seem to recall, there's a hierarchy in these things. Btw: you'll find the content that is displayed in Controller.ss.
Curious what would happen if I had an existing Page with URLSegment 'someURL' and then added a Controllerclass with that same name...
25 October 2012 at 10:01pm
thanks for your answer!
I think you are absolutely right with the URL / Controller relation. But this seems to be a new feature since it is no problem to create an /upload URL within Silverstripe 2.4..
Nevertheless, it should be possible to configure some routing for these Urls, so the default Controller isn't called any more on i.e. /upload. Of course this gets problems, if u need to call the existen Upload_Controller afterwards, but I would tend to delay the solution for this problem on the day it occurs ;).
|Go to Top|