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.

We've moved the forum!

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.

Archive /

Our old forums are still available as a read-only archive.

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

Change admin path


Go to End


7 Posts   4438 Views

Avatar
Android08

Community Member, 18 Posts

29 September 2008 at 4:54am

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

Avatar
Hamish

Community Member, 712 Posts

29 September 2008 at 9:20am

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'
));

Avatar
Android08

Community Member, 18 Posts

29 September 2008 at 9:33am

Thanks. Thats worked perfectly. I spent ages looking for something like that, never thought to look in the config file.

Avatar
LoZzA

Community Member, 11 Posts

24 October 2008 at 12:54am

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?

Avatar
Android08

Community Member, 18 Posts

24 October 2008 at 1:17am

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.

Avatar
LoZzA

Community Member, 11 Posts

24 October 2008 at 1:20am

Yeah, they are all changed. It is really starting to frustrate me now!

Avatar
LoZzA

Community Member, 11 Posts

25 October 2008 at 11:34am

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!