Announcement

Collapse
No announcement yet.

Help understanding index.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help understanding index.php

    Ok, I have installed an SSL certificate, but I have a problem. When I type in my main URL e.g., www.myforum.com I want it to redirect to my forum/content.php (where I have articles, etc). It does redirect to that page, but now that I have an SSL cert, it ends up going to "https://myforum.com/forum/content.php" which seems right, BUT it does not render the page properly. The page is just a list of links (I'll attack a picture here);

    My Index.php file looks like this:

    PHP Code:
    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # vBulletin 4.2.0 Patch Level 2 - Licence Number XXXXXXXXXXXXX
    || # ---------------------------------------------------------------- # ||
    || # Copyright �2000-2012 vBulletin Solutions Inc. All Rights Reserved. ||
    || # This file may not be redistributed in whole or significant part. # ||
    || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
    || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
    || #################################################################### ||
    \*======================================================================*/

    /* Tell forum.php to redirect 
    to the default url as defined 
    in the navigation manager */
    define('VB_REDIRECT'true);

    /**
     * If you want to move this file to the root of your website, change the 
     * line below to your vBulletin directory and uncomment it (delete the //).
     *
     * For example, if vBulletin is installed in '/forum' the line should
     * state: define('VB_RELATIVE_PATH', 'forums');
     *
     * Note: You may need to change the cookie path of your vBulletin
     * installation to enable your users to log in at the root of your website.
     * If you move this file to the root of your website then you should ensure
     * the cookie path is set to '/'.
     *
     * See 'Admin Control Panel
     *    ->Cookies and HTTP Header Options
     *      ->Path to Save Cookies
     */

    define('VB_RELATIVE_PATH''forumí);

    // Do not edit anything below //
    if (defined('
    VB_RELATIVE_PATH'))
    {
        chdir('
    ./' . VB_RELATIVE_PATH);
    }

    require('
    forum.php');
    My question (for now) is, where is the default URL found? (Where do I define VB_REDIRECT)?? I know I must have known where this is at one time, but I've slept since then. I think if I can define that correctly it may work. Can someone tell me where I look to set VB_REDIRECT URL?

    Thanks

  • #2
    Update - Ok, I figured out what is meant (I think) when it says "Tell forum.php to redirect to the default url as defined in the navigation manager" So in Navigation manager when I had default set to my CMS (Articles) tab, when I type in www.mysite.com it does redirect to https://www.mysite.com/forum/content.php. I did not want it to redirect to the https:// but rather to http:// (otherwise for some reason it just gives me the skeleton and does not render the full page like it should. So, I edited that tab in Navigation Manager so it hard codes the URL to be http://www.mysite/forum/content.php (instead of content.php{session.sessionurl_q} but the index.php, whose code I posted above, continues to redirect to https://mysite.com/forum/content/php

    So, just for grins I made my blogs the default tab in Navigation Manager, but the index.php file in my root still re-directs to https://www.mysite.com/forum/content.php

    I thought that it would redirect to whichever tab I has assigned at the default? It is not doing that apparently. Any suggestions would be greatly appreciated.
    Last edited by BasilFawlty; Mon 5th Dec '16, 2:14pm.

    Comment


    • #3
      You need to fix the problem, not try all sorts weird things with redirects.
      Put it all back to how it was, and investigate the original issue (which looks like CSS not loading btw).
      Baby, I was born this way

      Comment


      • #4
        Originally posted by Paul M View Post
        You need to fix the problem, not try all sorts weird things with redirects.
        Put it all back to how it was, and investigate the original issue (which looks like CSS not loading btw).
        Every thing is the way it's been for years until I installed the SSL. I have had my main domain name redirecting to the "content.php" page for years with no issue. And oh by the way using the index.php file that came with my purchased VB software. You're right that I have to fix the problem - that's kinda the whole point of my thread. Everything is the way it;s always been, I just now need to know if anyone can suggest WHY the content.php (CMS) will not render properly with https: That's what I need to solve.

        Comment


        • #5
          Have you changed the URL in the admincp to reflect the https?
          MARK.B | vBULLETIN SUPPORT

          TalkNewsUK - My vBulletin 5.5.4 Demo
          AdminAmmo - My Cloud Demo

          Comment


          • #6
            Your original image means is definitely your CSS not loading. One reason it might not load is if your webpage is over https but the css is still be served from insecure http. That's just the way it works, all https pages only show content from https links. Images. CSS, javascript or anything from an http link won't load.

            Do what Mark suggests but if still not helping go to Admin CP -> Settings -> Options -> Style & Language settings and make sure the option Store CSS Stylesheets as Files? is set to NO, so they come from the database and not their own http link.

            Comment


            • #7
              If you store CSS as files, you will need to rebuild them after switching (i.e. just rebuild all your styles).
              Baby, I was born this way

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X