1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Index page wont load css and js

Discussion in 'Troubleshooting and Problems' started by JordanH, Apr 6, 2013.

  1. JordanH

    JordanH Well-Known Member

    I recently changed servers and now whenever you try to load the index of my page, it does not load the css or the javascript properly.

    I do force an SSL on the forum, but I have always had an SSL on it so I do not think that is the problem. because of the css and js not loading properly, SSL also indicates the forum is not secure.

    From what I can see, the base URL is not working properly anymore. Heres what I mean:

    https://www.gamingsection.net here you can see the index, broken. Here is what the html looks like:
    [​IMG]

    Notice how the base url is http:// (not https) and its gamingsection.net when it should be www.gamingsection.net

    Heres what all my other pages look like, for example my profile page:

    https://www.gamingsection.net/members/jordan.184/

    [​IMG]

    As you can see the base url works fine now.

    How come the index page is not loading properly?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. JordanH

    JordanH Well-Known Member

    That had not helped at all.

    I do know one thing, the server change went from apache to lightspeed if that means anything.

    My PAGE_CONTAINER was edited, and I did revert it. Did not do anything.

    I also added your $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP']; which did not do anything as well.

    But like I said, other pages load fine. How come its just the index? Also, so far still no fix.
     
  4. Mike

    Mike XenForo Developer Staff Member

    Different servers expose HTTPS to PHP differently. I suspect, for some reason, it's simply not doing that on the index page.

    You can probably just add this to your config.php:

    $_SERVER['HTTPS'] = 'on';

    Does that fix it? Note that will only work if you always use SSL on the forums.
     
  5. JordanH

    JordanH Well-Known Member

    Sadly that does not work either :(

    The thing is. It worked fantastic with no errors or nothing wrong before I transferred to this new server.
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I can take a look if you give me admin and FTP access.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There was an index.html file in the forum root which contained the page with the bad base href which was failing to load the CSS. I renamed the file to index.html.bak. The problem is solved.
     
    Tracy Perry likes this.
  8. Tracy Perry

    Tracy Perry Well-Known Member

    lr.jpg to the rescue!
    I just wanna know, which one is you and which one is Brogan? :ROFLMAO:
     

Share This Page