Announcement

Collapse
No announcement yet.

Too Many Redirects

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

  • Too Many Redirects

    I searched the forum and couldn't find an answer to this question, so I thought I would through this out here:

    On bighuskerfan.com/vbbs, if I have "Route Channels and Conversations by Node ID" set to no, any articles that have been published you cannot go to or you get "ERR_TOO_MANY_REDIRECTS"

    If I have it set to on, then it will work, but the users will no longer get the option of "New Topics" under the forums tab.

    We are running Vbulletin 5.3.1
    PHP 7.1.3
    MySQL 5.5.51-38.2

    My .htaccess file has this in it:

    RewriteEngine On

    # In some cases where you have other mod_rewrite rules, you may need to remove the
    # comment on the following RewriteBase line and change it to match your folder name.
    # This resets the other mod_rewrite rules for just this directory
    # If your site was www.example.com/forum, the setting would be /forum/
    # RewriteBase /vbbs/

    #To redirect users to the secure version of your site, uncomment the lines below
    RewriteCond %{HTTPS} !=on
    RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

    # Send css calls directly to the correct file VBV-7807
    RewriteRule ^css.php$ core/css.php [NC,L]

    # Redirect old install path to core.
    RewriteRule ^install/ core/install/ [NC,L]

    # Main Redirect
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]

    # Because admincp is an actual directory.
    RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]

    I have tried to edit the name of the articles, but it doesn't make any difference.

    Some help would be appreciated.

    Thanks, Allen

  • #2
    Anybody?

    Comment


    • #3
      Well I fixed it for now. I had to change back to PHP 5.6 from 7.1. Something with 7.1 breaks it.

      Comment


      • #4
        vBulletin 5 should work with PHP 7.1. What is in the parent directory? Any .htaccess there? If so, you should use the Rewritebase line. You have it commented out above.

        Also I noticed that your site was switching between www.bighuskerfans.com and bighuskerfans.com. You should choose one of these and set the urls appropriately under Settings -> Options -> Site Name / URL / Contact Details. Switching between the two can cause a redirect problem.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud customization and demonstration site.
        vBulletin 5 Documentation - Updated every Friday. Report issues here.
        vBulletin 5 API - Full / Mobile
        I am not currently available for vB Messenger Chats.

        Comment


        • #5
          The Rewritebase line doesn't make any difference. The is no "www." in the contact details.

          Comment


          • #6
            I went through the page and took out anything that referred to www.bighuskerfan.com and changed it to bighuskerfan.com and it still doesn't make any difference.

            Comment


            • #7
              We really don't have the tools to track redirects. We ship with a single .htaccess file which should do one redirect on most pages. Some pages like old content that was imported and accessed via old URLs or forums that have been renamed will require additional redirects to keep older URLs working. Generally speaking, everything is currently handled by the index.php file.

              If the server architecture requires additional redirects, we have no control over that within vBulletin. The redirects we do have in the .htaccess file are basic.

              You should discuss this with your hosting provider or server administrator to see if they can track the redirects and what is actually happening on the server.

              For the record, I am not receiving this error. Though your main page does take a decent while to load.
              Last edited by Wayne Luke; Tue 8th Aug '17, 12:41pm.
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud customization and demonstration site.
              vBulletin 5 Documentation - Updated every Friday. Report issues here.
              vBulletin 5 API - Full / Mobile
              I am not currently available for vB Messenger Chats.

              Comment


              • #8
                It only happens when I switch to php 7.1, that's why you are not seeing it now.

                Comment


                • #9
                  There should be no functional difference in redirects with PHP 5.6 and PHP 7.1 unless you're using NGINX. We've included an updated vhost file in the download package that should be used with PHP 7+ and NGINX. You can find the vhost files in the do_not_upload folder.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                  vBulletin 5 Documentation - Updated every Friday. Report issues here.
                  vBulletin 5 API - Full / Mobile
                  I am not currently available for vB Messenger Chats.

                  Comment


                  • #10
                    When I have php 7.1 set this is what I get when I trace it:

                    https://bighuskerfan.com/vbbs/151389...y-mark-solomon HTTP/1.1 301 Moved Permanently Date: Wed, 09 Aug 2017 13:51:29 GMT Server: Apache Set-Cookie: bbsessionhash=6b464b6796a010fe03741a6ebecbe7dc; path=/vbbs/; secure; HttpOnly Set-Cookie: bblastvisit=1502286689; path=/vbbs/; secure; HttpOnly Set-Cookie: bblastactivity=1502286689; path=/vbbs/; secure; HttpOnly Location: https://bighuskerfan.com/vbbs/151389...y-mark-solomon Connection: keep-alive Vary: Accept-Encoding Content-Length: 0 Content-Type: text/html; charset=UTF-8 https://bighuskerfan.com/vbbs/151389...y-mark-solomon HTTP/1.1 301 Moved Permanently Date: Wed, 09 Aug 2017 13:51:30 GMT Server: Apache Set-Cookie: bbsessionhash=6b464b6796a010fe03741a6ebecbe7dc; path=/vbbs/; secure; HttpOnly Set-Cookie: bblastvisit=1502286690; path=/vbbs/; secure; HttpOnly Set-Cookie: bblastactivity=1502286690; path=/vbbs/; secure; HttpOnly Location: https://bighuskerfan.com/vbbs/151389...y-mark-solomon Connection: keep-alive Vary: Accept-Encoding Content-Length: 0 Content-Type: text/html; charset=UTF-8 Just repeats until it times out.

                    Comment


                    • #11
                      This is what I get with php 5.6 set:

                      https://bighuskerfan.com/vbbs/151389...y-mark-solomon HTTP/1.1 200 OK Date: Wed, 09 Aug 2017 13:58:02 GMT Server: Apache X-UA-Compatible: IE=edge,chrome=1 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: bbsessionhash=6b464b6796a010fe03741a6ebecbe7dc; path=/vbbs/; secure; httponly Set-Cookie: bblastvisit=1502287082; path=/vbbs/; secure; httponly Set-Cookie: bblastactivity=1502287082; path=/vbbs/; secure; httponly Set-Cookie: PHPSESSID=dda6d351aadc54b447283e6fdcbae200; path=/ Connection: keep-alive Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8

                      Comment


                      • #12
                        Are you using NGINX?

                        If not, you'll need to ask your hosting provider if there is anything that could cause a 301 redirect under PHP 7.1. Could be a setting in the PHP ini file or how PHP 7.1 is called from the server.
                        Translations provided by Google.

                        Wayne Luke
                        The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                        vBulletin 5 Documentation - Updated every Friday. Report issues here.
                        vBulletin 5 API - Full / Mobile
                        I am not currently available for vB Messenger Chats.

                        Comment


                        • #13
                          It's Hostgator. This is the weird thing. If I go to edirectcheck.com/index.php and run it through, I get this:
                          Results:

                          http://bighuskerfan.com/vbbs/151389-...y-mark-solomon HTTP/1.1 301 Moved Permanently Server: nginx/1.12.1 Date: Wed, 09 Aug 2017 16:03:38 GMT Content-Type: text/html; charset=iso-8859-1 Content-Length: 373 Connection: keep-alive Location: https://bighuskerfan.com/vbbs/151389...y-mark-solomon Vary: Accept-Encoding https://bighuskerfan.com/vbbs/151389...y-mark-solomon HTTP/1.1 301 Moved Permanently Date: Wed, 09 Aug 2017 16:03:39 GMT Server: Apache Set-Cookie: bbsessionhash=fbe806155bca38800ca4ed9ec742a03e; path=/; secure; HttpOnly Set-Cookie: bblastvisit=1502294619; path=/; secure; HttpOnly Set-Cookie: bblastactivity=1502294619; path=/; secure; HttpOnly Location: https://bighuskerfan.com/vbbs/151389...y-mark-solomon Connection: keep-alive Vary: Accept-Encoding Content-Length: 0 Content-Type: text/html; charset=UTF-8 The first one shows nginx, but the rest of them show apache. Not sure what to make of that.

                          Comment


                          • #14
                            This message - 301 Moved Permanently is a redirect. It is redirecting to itself. It shouldn't do that. If our vhost config is in place and it is still caused by vBulletin it would be a bug that is triggered by your server configuration somehow.

                            NGINX is often used as a front-end to Apache. Apache is viewed as slow by some. You need to have Hostgator configure your site to use the PHP 7 vhost file in the do_not_upload folder or move you to a server that doesn't use NGINX, or find a new hosting provider to use vBulletin and PHP 7.
                            Translations provided by Google.

                            Wayne Luke
                            The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                            vBulletin 5 Documentation - Updated every Friday. Report issues here.
                            vBulletin 5 API - Full / Mobile
                            I am not currently available for vB Messenger Chats.

                            Comment


                            • #15
                              I did a little tracking down and they only use nginix on port 80 requests, anything on SSL uses apache. So the .htaccess file is controlling it. In fact that is basically how I change it from php 5.6 to 7.1. If I do a trace on it going directly to https://bighuskerfan.com/vbbs/151391...ghuskerfan-com is just going through apache with the redirects from the standard .htaccess file.

                              Could it be something screwed up in the database?

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X