Search code examples
expressionengine

HTTPS & HTTP ExpressionEngine Site URL Tag


I have found out today that if you visit an EE site that uses the {site_url} tag in the path of the css link in the document head, that the site can not load the CSS file if you type in https rather than http.

I have got round this by using a htaccess file to force onto the http, but I just wondered if there was a setting within EE that you can change to make both work?

This only happened on Chrome and IE, I am guessing depends what your browser is set up to allow security wise.


Solution

  • When I load CSS and JS I never use the domain I just set it relatively. for example:

    <link rel="stylesheet" href="/layout/styles/layout.css" >
    

    If you try this does that work?