Announcement

Collapse
No announcement yet.

People with archive problems look here

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

  • People with archive problems look here

    yay me and my host figured it out, those who have the problem where the archive redirects to the home page:

    This all needed to be taken out:

    # if (strpos($_SERVER['PHP_SELF'] , '/archive/index.php/') === false)
    # if (strpos('/archive/index.php/', $_SERVER['PHP_SELF']) === false)
    # if ('/archive/index.php/' != $_SERVER['PHP_SELF'] ."/")
    #{
    #echo $_SERVER['PHP_SELF']; exit;
    # exec_header_redirect("$vboptions[bburl]/archive/index.php/");
    #}

    When you are at the URL

    http://www.yoururl.com/archive/index.php/t-14467

    the variable PHP_SELF equals /t-14467 not index.php

    Therefore the above check will always fail and that is why I removed it.

    Also make an htacces with the follow:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+) /archive/index.php/$1 [L]

    It works!!
    Last edited by dethfire; Thu 25 Mar '04, 4:08pm.
    http://www.physicsforums.com

  • #2
    Thanks for posting this, dethfire. A few questions... First, did you have to reinstall php as a module as suggested in another thread? Also, what file contains the lines of code that need to be removed? Any comments from the vBulletin Team?

    Comment


    • #3
      Originally posted by Visibility
      Thanks for posting this, dethfire. A few questions... First, did you have to reinstall php as a module as suggested in another thread? Also, what file contains the lines of code that need to be removed? Any comments from the vBulletin Team?
      no need reinstalling anything!

      The lines of code that need to be commented out are right below the "START MAIN SCRIPT " comments.
      http://www.physicsforums.com

      Comment


      • #4
        Thanks, dethfire. Unfortunately, even after removing the lines and modifying .htaccess my archive still redirects. I may have to try the php/module fix.

        Oddly, my index.php in the archive folder has different code at the beginning:

        if (strpos($_SERVER['PHP_SELF'] , '/archive/index.php/') === false)
        {
        exec_header_redirect("$vboptions[bburl]/archive/index.php/");
        }
        Last edited by Visibility; Thu 25 Mar '04, 5:57pm.

        Comment


        • #5
          Originally posted by dethfire
          yay me and my host figured it out, those who have the problem where the archive redirects to the home page:

          This all needed to be taken out:

          # if (strpos($_SERVER['PHP_SELF'] , '/archive/index.php/') === false)
          # if (strpos('/archive/index.php/', $_SERVER['PHP_SELF']) === false)
          # if ('/archive/index.php/' != $_SERVER['PHP_SELF'] ."/")
          #{
          #echo $_SERVER['PHP_SELF']; exit;
          # exec_header_redirect("$vboptions[bburl]/archive/index.php/");
          #}

          When you are at the URL

          http://www.yoururl.com/archive/index.php/t-14467

          the variable PHP_SELF equals /t-14467 not index.php

          Therefore the above check will always fail and that is why I removed it.

          Also make an htacces with the follow:

          RewriteEngine On
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteRule ^(.+) /archive/index.php/$1 [L]

          It works!!
          What version of VB3 are you running? I'm running vb3 gold and I don't see those lines in my /archive/index.php

          Mine looks like this:
          PHP Code:
            // #######################################################################
          // ######################## START MAIN SCRIPT ############################
          // #######################################################################
          if (strpos($_SERVER['PHP_SELF'] , '/archive/index.php/') === false)
          {
           
          exec_header_redirect("$vboptions[bburl]/archive/index.php/");
          }
          // parse query string
          $f 0;
          $p 0;
          $t 0;
          $endbit substr (strrchr($_SERVER['PHP_SELF'], '/') , 1); 

          Comment


          • #6
            I'm on vB3 Gold, too, TC1 - looks like our code is the same.

            Comment


            • #7
              Same here

              Mine is not working, i get the same code as the 2 guys above.

              Im on vB3 Gold

              Paul

              Comment


              • #8
                http://www.vbulletin.com/forum/showt...hlight=archive

                Comment


                • #9
                  Im running vb303, I can get the archive main page to come up, but when I select a forum link I get the infamous 'Page cannot be found'

                  Comment


                  • #10
                    Please start your own thread with all the revelant info, thanks.

                    Comment

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