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

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

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

Website migration error

Go to End

2 Posts   1659 Views


Community Member, 15 Posts

22 April 2017 at 12:39am

I migrated a website from dev (http) to live (https). The page doesn't load my css and js. After looking at the source it should it's trying to get them via http. I need to get the by https.

Here is the code in my where I load my stylesheets and scripts:

<link type="text/css" rel="stylesheet" href="$BaseHref$ThemeDir/assets/css/example.css"/>

and it displays the following line:

It should return https

Michael J James

Community Member, 8 Posts

26 April 2017 at 2:26am

Hi @SilverstripeLearner,

Have you tried adding Director::forceSSL(); into your _config.php file.

I haven't tested but it should do it.