VB5 connect - URL changing when logging out

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChrisRowarth
    New Member
    • Mar 2017
    • 8
    • 5.2.x

    VB5 connect - URL changing when logging out

    Hi!

    I currently have a VB5 connect installation that lives on http://domain.com/forum. when clicking log in you're able to log in fine. When you click log out, it changes the URL from http://domain.com/forum to http://www.domain.com/forum

    If you then try to log in from http://www.domain.com/forum, it accepts the credentials, but the page doens't change to reflect the logged in user (it essentially stays the same). If you then click log in again, enter your credentials and hit the log in button, you get:




    Remove the WWW from the URL and the page will then show that you're logged in. All the URL settings from the adminCP do not include the WWW in the URL, and there's no redirects in the .htaccess file (that I can see..) nor are there any base URL's defined.

    I can't work out why logging out changes the URL to include the WWW. It's frustrating!
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24275
    • 6.0.X

    #2
    Must be some sort of redirect going in for that to happen.

    Check every folder for .htaccess files, if you find any, check they don't contain any rewrite rules.

    Replace the root htaccess file with a default one from the download package (it's called htaccess.txt by default, you'll need to rename it).
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • ChrisRowarth
      New Member
      • Mar 2017
      • 8
      • 5.2.x

      #3
      Hi Mark,

      I've checked the .htaccess files in these locations:
      • includes/
      • core/vb5/
      • core/vb/
      • core/libraries/
      • core/includes/

      All of those are the same as each other (just prevent directory browsing) and contain no redirects. I've replaced the .htaccess with the one from the installation package for the root folder. Problem still seems to exist.

      Some backstory in case it's useful:

      The forum used to live on this URL: http://forum.domain.com. The hosting provider maps sub-domains to a folder 1 level above the root WWW folder (so in this case /forum, with the root WWW folder being /www). I decided to change the URL from http://forum.domain.com to http://domain.com/forum, so I did the following:
      1. "closed" the forum using the adminCP
      2. altered the URLs in the adminCP to reflect the URL change
      3. I then moved the folder the forum is installed in from the space that's one level above the root WWW folder to within the root directory (so from /forum/ to /www/forum)
      4. opened the forum again from the adminCP


      And this is where the problem appeared. Besides those steps, are there any others I should've done?

      Comment

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24275
        • 6.0.X

        #4
        Have you got redirection from www to non-www?
        Although from your description this might create a loop.
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • ChrisRowarth
          New Member
          • Mar 2017
          • 8
          • 5.2.x

          #5
          On the registrars side:

          www.domain.com is a CNAME record that points to domain.com. Then domain.com is configured as an A record that points to the hosting providers webserver.

          On the hosting providers platform:

          By default domain.com and www.domain.com are both mapped to the root web folder, /www/ which contains a PHP redirect script inside an index.php to send you to domain.com/forum and the forum is on /www/forum/ which is where domain.com/forum will land you.

          I'm quite keen on keeping the URL as domain.com/forum rather than www.domain.com/forum. The only thing I haven't tried yet is setting all the URLs to www.domain.com in the adminCP and seeing if I get this bizarre error

          Comment

          • Mark.B
            vBulletin Support
            • Feb 2004
            • 24275
            • 6.0.X

            #6
            This sounds dubious and we'd need to have a look.
            The idea of hosts having their own index.php files floating around isn't likely to play well with vBulletin. Although as I said, we will need to have a look. Please raise a support ticket.
            MARK.B
            vBulletin Support
            ------------
            My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
            My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

            Comment

            • ChrisRowarth
              New Member
              • Mar 2017
              • 8
              • 5.2.x

              #7
              Originally posted by Mark.B
              This sounds dubious and we'd need to have a look.
              The idea of hosts having their own index.php files floating around isn't likely to play well with vBulletin. Although as I said, we will need to have a look. Please raise a support ticket.
              the index.php is something I created to forward from http://domain.com to http://domain.com/forum, wasn't their doing. Once you're on http://domain.com/forum that redirect shouldn't enter in to things. It also doesn't have in it anything that rewrites the URL, adding the www to the start.

              I'll raise a support ticket, once i've tried altering the URLs to include the www. prefix within the adminCP. If that resolves the issue, I'm happy to live with a URL that has the www. prefix.

              Comment

              • Mark.B
                vBulletin Support
                • Feb 2004
                • 24275
                • 6.0.X

                #8
                Originally posted by ChrisRowarth

                the index.php is something I created to forward from http://domain.com to http://domain.com/forum, wasn't their doing. Once you're on http://domain.com/forum that redirect shouldn't enter in to things. It also doesn't have in it anything that rewrites the URL, adding the www to the start.
                vBulletin has its own index.php file. If you've got one of your own, even if it's technically in a different directory to handle redirects, that's not going to work.

                A redirect from www to non-www - or vice versa - should be handled in an .htaccess file or its equivalent. Or set in the server control panel (which amounts to the same thing).
                MARK.B
                vBulletin Support
                ------------
                My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                Comment

                • ChrisRowarth
                  New Member
                  • Mar 2017
                  • 8
                  • 5.2.x

                  #9
                  Originally posted by Mark.B
                  vBulletin has its own index.php file. If you've got one of your own, even if it's technically in a different directory to handle redirects, that's not going to work.

                  A redirect from www to non-www - or vice versa - should be handled in an .htaccess file or its equivalent. Or set in the server control panel (which amounts to the same thing).
                  OK so if my own index.php resides in "/", and the forum lives in "/forum/" with its own index.php, the index.php file in "/" can still interfere with things in folders under it? (in my case "/forum/"). Can you explain why this wouldn't work, because i'm struggling to see why it would affect things recursively.. I wouldn't have expected a PHP script like this simple redirect to act in that way. It's also confusing because it doesn't contain any redirect that might add the www prefix that i'm seeing which is the main issue.

                  That said, I will remove that PHP script and just configure an .htaccess file to redirect to "/forum/" from "/" if this is the better way of doing it, and see if it has any positive impact on my issue.

                  What is still a mystery is why when logging out, it alters the URL to add a www. to the start of the URL, given all the above. (i'm not currently trying to redirect from www to non-www or vice versa)

                  Comment

                  • ChrisRowarth
                    New Member
                    • Mar 2017
                    • 8
                    • 5.2.x

                    #10
                    Is there anything in the .htaccess that lives in the forums root folder that would rewrite the URL if it's missing the trailing slash? This is what seems to be happening when you log out, it puts you on the forum URL minus the trailing slash (which is what is configured in the adminCP), and at that point it's being rewritten. Can the provider possibly have their own hidden .htaccess that could rewrite the URL if it's missing that slash?

                    Comment

                    • Mark.B
                      vBulletin Support
                      • Feb 2004
                      • 24275
                      • 6.0.X

                      #11
                      Originally posted by ChrisRowarth
                      Is there anything in the .htaccess that lives in the forums root folder that would rewrite the URL if it's missing the trailing slash? This is what seems to be happening when you log out, it puts you on the forum URL minus the trailing slash (which is what is configured in the adminCP), and at that point it's being rewritten. Can the provider possibly have their own hidden .htaccess that could rewrite the URL if it's missing that slash?
                      There's nothing that would do this by default, my suspicion lies with the custom redirect. However, anything we say now is pure speculation. We need a support ticket with admin and (s)ftp access, so we can have a look.
                      MARK.B
                      vBulletin Support
                      ------------
                      My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                      My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                      Comment

                      • ChrisRowarth
                        New Member
                        • Mar 2017
                        • 8
                        • 5.2.x

                        #12
                        Thanks - the hosting provider swear blind that it's not anything on their side that would do it. Here's what happens with curl:

                        curl -i http://domain.com/forum
                        HTTP/1.1 301 Moved Permanently
                        Server: nginx
                        Date: Fri, 31 Mar 2017 10:48:44 GMT
                        Content-Type: text/html; charset=iso-8859-1
                        Content-Length: 326
                        Connection: keep-alive
                        Location: http://www.domain.com/forum/

                        <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
                        <html><head>
                        <title>301 Moved Permanently</title>
                        </head><body>
                        <h1>Moved Permanently</h1>
                        <p>The document has moved <a href="http://www.domain.com/forum/">here</a>.</p>
                        <hr>
                        <address>Apache/2.4.10 (Ubuntu) Server at www.domain.com Port 80</address>
                        </body></html>


                        can you point me in the correct direction to raise a ticket?

                        Comment

                        • Mark.B
                          vBulletin Support
                          • Feb 2004
                          • 24275
                          • 6.0.X

                          #13
                          Originally posted by ChrisRowarth
                          Thanks - the hosting provider swear blind that it's not anything on their side that would do it. Here's what happens with curl:

                          curl -i http://domain.com/forum
                          HTTP/1.1 301 Moved Permanently
                          Server: nginx
                          Date: Fri, 31 Mar 2017 10:48:44 GMT
                          Content-Type: text/html; charset=iso-8859-1
                          Content-Length: 326
                          Connection: keep-alive
                          Location: http://www.domain.com/forum/

                          <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
                          <html><head>
                          <title>301 Moved Permanently</title>
                          </head><body>
                          <h1>Moved Permanently</h1>
                          <p>The document has moved <a href="http://www.domain.com/forum/">here</a>.</p>
                          <hr>
                          <address>Apache/2.4.10 (Ubuntu) Server at www.domain.com Port 80</address>
                          </body></html>


                          can you point me in the correct direction to raise a ticket?
                          Sure...either login here: http://www.vbulletin.com/go/techsupport, or email [email protected] from your licensed account.
                          First method is preferable since you'll need to send us login info and the support ticket form has a "sensitive data" field for that. Email...well...doesn't!
                          MARK.B
                          vBulletin Support
                          ------------
                          My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                          My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                          Comment

                          Related Topics

                          Collapse

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