setting up the index.php file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • attroll
    Senior Member
    • Jan 2003
    • 1093
    • 4.2.X

    [Forum] setting up the index.php file

    Confused about setting up the index.php file.

    If I want someone to be redirect when they log onto my site to the forum, how would I set up the index.php file below? I am not using a /forum directory. Everything falls under public_html.



    define('VB_RELATIVE_PATH', 'forum');

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

    require('forum.php');
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    Don't touch that file in 4.2.0. You would set the default tab in the Navigation Manager in 4.2.0

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • attroll
      Senior Member
      • Jan 2003
      • 1093
      • 4.2.X

      #3
      Do you mind if I ask what that files is for then?

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        The index.php file? Well, most people have their server set to default to the index.php file. So, it redirects to an actual page in vbulletin.

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools <- awesome site for html/css help

        Comment

        • attroll
          Senior Member
          • Jan 2003
          • 1093
          • 4.2.X

          #5
          That is exactly what I want to do. When a user types www.mysite.com, I want it to either redirect them so that it opens forum.php or to content.php. How would I change vb index.php file to do this or should I replace the index file with the codes bellow?


          PHP Code:
          <? 
          header
          ("Location: http://mysite.com/content.php"); 
          ?>

          Comment

          • Lynne
            Former vBulletin Support
            • Oct 2004
            • 26255

            #6
            You would use the Navigation Manager to set the default tab now. Don't change the index.php file.

            This is stickied at the top of this forum - Resetting the Default Tab in 4.2.0.

            Please don't PM or VM me for support - I only help out in the threads.
            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
            Want help modifying your vbulletin forum? Head on over to vbulletin.org
            If I post CSS and you don't know where it goes, throw it into the additional.css template.

            W3Schools &lt;- awesome site for html/css help

            Comment

            • attroll
              Senior Member
              • Jan 2003
              • 1093
              • 4.2.X

              #7
              OK, I have set my Navigation Manager to have the Articles as my default tab. But when I type www.mysite.com all I get is a blank page. Is it suppose to open in the Articles tab?

              Comment

              • Lynne
                Former vBulletin Support
                • Oct 2004
                • 26255

                #8
                Here is a page from the manual about troubleshooting blank or 'white' pages: https://www.vbulletin.com/docs/html/blank_pages

                Please don't PM or VM me for support - I only help out in the threads.
                vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                Want help modifying your vbulletin forum? Head on over to vbulletin.org
                If I post CSS and you don't know where it goes, throw it into the additional.css template.

                W3Schools &lt;- awesome site for html/css help

                Comment

                • attroll
                  Senior Member
                  • Jan 2003
                  • 1093
                  • 4.2.X

                  #9
                  Let me ask you this question about the vb index.php file. I have my tab manager set to the default of Articles. I have not done any editing of the index.php file. If I type www.mysite.com/index.php, where is that suppose to open up to?

                  Comment

                  • Lynne
                    Former vBulletin Support
                    • Oct 2004
                    • 26255

                    #10
                    If you type in mysite.com/index.php , it should forward you to mysite.com/content.php

                    Please don't PM or VM me for support - I only help out in the threads.
                    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                    Want help modifying your vbulletin forum? Head on over to vbulletin.org
                    If I post CSS and you don't know where it goes, throw it into the additional.css template.

                    W3Schools &lt;- awesome site for html/css help

                    Comment

                    • attroll
                      Senior Member
                      • Jan 2003
                      • 1093
                      • 4.2.X

                      #11
                      When I type www.mysite.com/index.php it brings me to a blank page. But if I type www.mysiye.com/content.php the page shows up. To me, this tells me that there is something wrong with the redirect. Like I said, I have not changed anything in the index.php file.

                      Comment

                      • Lynne
                        Former vBulletin Support
                        • Oct 2004
                        • 26255

                        #12
                        So the index.php page is a totally default vB4.2.0 file?

                        Disable all Products except the vBulletin Blog and vBulletin CMS (Admin CP -> Plugins & Products -> Manage Products -> Disable) AND uncheck all the plugins except those related to the vBulletin Blog and vBulletin CMS by (Admin CP -> Plugins & Products -> Plugin Manager). You must do BOTH of those steps in order to disable all non vBulletin Modifications. And now see if the index.php file redirects.

                        Please don't PM or VM me for support - I only help out in the threads.
                        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                        Want help modifying your vbulletin forum? Head on over to vbulletin.org
                        If I post CSS and you don't know where it goes, throw it into the additional.css template.

                        W3Schools &lt;- awesome site for html/css help

                        Comment

                        • attroll
                          Senior Member
                          • Jan 2003
                          • 1093
                          • 4.2.X

                          #13
                          I have disabled all products and plugins in both locations that you mentioned. But still get the sam results. I am open to any other ideas?

                          Comment

                          • Lynne
                            Former vBulletin Support
                            • Oct 2004
                            • 26255

                            #14
                            Do you have an .htaccess file? Try removing that. (And you are using a totally default style, right?)

                            Please don't PM or VM me for support - I only help out in the threads.
                            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                            Want help modifying your vbulletin forum? Head on over to vbulletin.org
                            If I post CSS and you don't know where it goes, throw it into the additional.css template.

                            W3Schools &lt;- awesome site for html/css help

                            Comment

                            • attroll
                              Senior Member
                              • Jan 2003
                              • 1093
                              • 4.2.X

                              #15
                              I deleted the .htaccess file I had and I am now using a default style and I am still having this issue.

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎