Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Change admin path

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

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

Page: 1
Go to End
Author Topic: 2956 Views
  • Android08
    Avatar
    Community Member
    18 Posts

    Change admin path Link to this post

    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

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Change admin path Link to this post

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

  • Android08
    Avatar
    Community Member
    18 Posts

    Re: Change admin path Link to this post

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

  • LoZzA
    Avatar
    Community Member
    11 Posts

    Re: Change admin path Link to this post

    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?

  • Android08
    Avatar
    Community Member
    18 Posts

    Re: Change admin path Link to this post

    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.

  • LoZzA
    Avatar
    Community Member
    11 Posts

    Re: Change admin path Link to this post

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

  • LoZzA
    Avatar
    Community Member
    11 Posts

    Re: Change admin path Link to this post

    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!

    2956 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.