Jump to:

4875 Posts in 7042 Topics by 1472 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » migrating to live server, base_tag not including sub directory

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1
Go to End
Author Topic: 1194 Views
  • DsX
    Avatar
    Community Member
    178 Posts

    migrating to live server, base_tag not including sub directory Link to this post

    I am migrating my site to a live server, and have made a suggested change to: sapphire/security/RandomGenerator.php
    at which time I got past the immediate error, but now my theme is broken, and it seems to be due to base_tag not including the folder name that I am at. Base_tag is outputting eg: http://www.mysite.com/ rather than http://www.mysite.com/ss-folder/

    also in my navigation template, $Link only returns links as eg: "/path/"
    since they are returned with a leading "/" they all break since my install is in a sub directory.

    I don't get this I have run SS in a sub dir before and all has worked... something new happening here?

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: migrating to live server, base_tag not including sub directory Link to this post

    I have spent far too long on this problem... especially since in the end it was very easy.

    so, another possible cause of problems when moving your install into our out of a directory is:

    Director::setBaseURL('/');

    If you have added this to your config file, it must be updated.

    If you are wondering why you would add it to start with, I found that it solved a problem with Base_tag appending index.php to my base tag.
    see: http://www.silverstripe.org/installing-silverstripe/show/11824

    1194 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.