• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Infinite Redirect

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Infinite Redirect

    • Issue Tools
      • View Changes
    1. issueid=5411 May 31, 2018 10:37 PM
      UrbanMCq UrbanMCq is offline
      New Member
      Infinite Redirect
      Cannot load any wiki page, redirects to itself

      My wiki is located at https://www.urbanmc.net:8080/wiki/.
      Using http://redirectdetective.com, I found that it continually redirect to itself.

      I installed the lite version earlier this afternoon and I've looked around for a solution and found none. I'm not getting any server errors, and only the wiki is affected.
    Issue Details
    Issue Number 5411
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Infinite Loops
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.0.21
    Fixed Version 4.0.23
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypeLite
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. May 31, 2018 10:48 PM
      pegasus pegasus is offline
      VaultWiki Team
      In your forum's library/config.php file, add the following:
      Code:
      $config['force_port'] = 8080;
      $config['force_scheme'] = 'https://';
      Reply Reply  
    2. May 31, 2018 11:24 PM
      UrbanMCq UrbanMCq is offline
      New Member
      Thanks for the quick response. Unfortunately, that didn't change anything. I still can't access any page under /wiki/. The quick links under the wiki tab (Search, Watched and Your Feeds) work fine.
      Reply Reply  
    3. June 1, 2018 1:03 AM
      pegasus pegasus is offline
      VaultWiki Team
      Does the web server actually run at port 8080, or is 8080 the port of a reverse proxy? If it's a proxy, please make sure your server is properly configured so that PHP can see that the user entered through port 8080.

      Upload the following test script to your site and visit it in a browser. Filename "port_test.php":
      Code:
      <?php
      
      echo $_SERVER['SERVER_PORT'];
      exit;
      If you visit this and the response is a number that is not "8080", then something is wrong in the server configuration.

      Here are some example configs for nginx web servers:
      https://serverfault.com/questions/25...nx-and-varnish

      Once the server-port is correctly reported by PHP, change the edit to library/config.php that I suggested earlier (the previously posted answer is the solution to the opposite problem -- the proxy server at 80 forwards to web server at 8080). The new edit would be:
      Code:
      $config['force_port'] = '';
      $config['force_scheme'] = 'https://';
      Reply Reply  
    4. June 1, 2018 9:20 AM
      UrbanMCq UrbanMCq is offline
      New Member
      The test script returns 8080. Your new config.php edit doesn't change anything.
      Reply Reply  
    5. June 2, 2018 11:51 AM
      UrbanMCq UrbanMCq is offline
      New Member
      I tried reinstalling VaultWiki to see if that might fix the issue. I still have an infinite loop on any page under /wiki/, and I can't set permissions, clear caches or add areas in the wiki admin panel.
      Reply Reply  
    6. June 2, 2018 7:44 PM
      pegasus pegasus is offline
      VaultWiki Team
      Since you are having an issue on some admin forms, it gives me a different idea:

      Please try the following test script in your browser:
      Code:
      <?php
      
      echo $_SERVER['HTTPS'];
      If you access the script over https:// the script should return "1" or "on". If it returns nothing or a different value, this could explain the infinite redirect, especially if your server is configured to redirect http:// to https://. When a VaultWiki page tries to resolve a URL, it relies on the HTTPS state matching the protocol that was actually used.

      In this case, you would need to update the way your web server invokes PHP so that it passes the correct HTTPS state to $_SERVER after the proxy occurs.
      Reply Reply  
    7. June 2, 2018 11:02 PM
      UrbanMCq UrbanMCq is offline
      New Member
      I ran that script on my server. The result was "on".
      Reply Reply  
    8. June 6, 2018 10:26 AM
      pegasus pegasus is offline
      VaultWiki Team
      I was finally able to duplicate this issue here. Internally when figuring out the URL in the visitor's browser address bar, the port number was sometimes added to the URL twice. It will be fixed in the next release. In vault/core/model/vw.php, find:
      Code:
      if (!$host)
      Replace with:
      Code:
      			if ($host)
      			{
      				if (preg_match('#(.+):\d+$#U', $host, $m))
      				{
      					$host = $m[1];
      				}
      			}
      			else
      Reply Reply  
    9. June 8, 2018 12:31 PM
      UrbanMCq UrbanMCq is offline
      New Member
      Thanks for the help. It works smoothly now.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 5:48 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.