My server hosting uses /admin as the path for its control panel. Is it possible to change the path that silverstripe uses? I have seen other posts on here of how people have done this but I don't really know where to start.
thanks
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
My server hosting uses /admin as the path for its control panel. Is it possible to change the path that silverstripe uses? I have seen other posts on here of how people have done this but I don't really know where to start.
thanks
Howdy,
Open up /cms/_config.php - you'll have a series of Director rules. Just change 'admin' to whatever you want it to be for each line. Eg, to move the admin to 'myadmin':
Director::addRules(50, array(
'processes/$Action/$ID/$Batch' => 'BatchProcess_Controller',
'silverstripe' => '->myadmin',
'cms' => '->myadmin',
'myadmin/statistics/$Action/$ID' => 'StatisticsAdmin',
'myadmin/security/$Action/$ID/$OtherID' => 'SecurityAdmin',
'myadmin/help/$Action/$ID' => 'CMSHelp',
'myadmin/newsletter/$Action/$ID' => 'NewsletterAdmin',
'myadmin/reports/$Action/$ID' => 'ReportAdmin',
'myadmin/assets/$Action/$ID' => 'AssetAdmin',
'myadmin/comments/$Action' => 'CommentAdmin',
'myadmin/ReportField/$Action/$ID/$Type/$OtherID' => 'ReportField_Controller',
'myadmin/bulkload/$Action/$ID/$OtherID' => 'BulkLoaderAdmin',
'myadmin/ImageEditor/$Action' => 'ImageEditor',
'myadmin/$Action/$ID/$OtherID' => 'CMSMain',
'unsubscribe/$Email/$MailingList' => 'Unsubscribe_Controller',
'PageComment/$Action/$ID' => 'PageComment_Controller'
));
Thanks. Thats worked perfectly. I spent ages looking for something like that, never thought to look in the config file.
I have had the same problem and have now changed everything in ./cms/_config.php from 'admin' to 'cmsadmin'.
I can now log into CMS, but I can't navigate anywhere in it without getting and error, as it is still looking for./admin/ and not ./cmsadmin/
What else do I need to change?
Did you change it in every place in the code above? Where it say myadmin you need to have cmsadmin. Doing that worked fine for me so if that isn't it then I don't know.
Yeah, they are all changed. It is really starting to frustrate me now!
Well all I can do is install SilverStripe in its own directory and use .htaccess in the html/ directory to redirect to the SilverStripe directory. Hopefully this will work!