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.

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