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.

Installing SilverStripe /

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

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

migrating to live server, base_tag not including sub directory


Go to End


2 Posts   1773 Views

Avatar
DsX

Community Member, 178 Posts

5 January 2011 at 11:55am

Edited: 05/01/2011 4:10pm

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?

Avatar
DsX

Community Member, 178 Posts

6 January 2011 at 10:58am

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