How to fix 'Redirected Loop' issue

Results 1 to 17 of 17
  1. #1
    Member akajsmoove is offline
    MemberRank
    Aug 2014 Join Date
    28Posts

    ! How to fix 'Redirected Loop' issue

    Hey, I've got a quick question.
    Sometimes when someone tries to go on my retro, they click 'Enter' to vote, page loads, loads, then says 'This page has a redirected loop'
    It shows the address by on top: findretros.com/rankings/vote/(hotel name here)


    Can someone please help me, I'll post whatever code I'm asked to post too!


  2. #2
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: How to fix 'Redirected Loop' issue

    I think it is due to the findretro's forwarding the person to your client but the client says he hasn't voted yet and forward him to the voting page.

    Put your client php file in here.

  3. #3
    www.Epic Hosts.co.uk Terrum is offline
    Grand MasterRank
    Jun 2008 Join Date
    EpicHosts,co.ukLocation
    1,322Posts

    Re: How to fix 'Redirected Loop' issue

    Did you set the full link (not just 'client.php') to your client as the redirector after voting on your settings of the API? When you login to your account on findretros.com you need to set the redirector to the full link of your hotel's client, which is under some obscure settings.

  4. #4
    Member akajsmoove is offline
    MemberRank
    Aug 2014 Join Date
    28Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by The General View Post
    I think it is due to the findretro's forwarding the person to your client but the client says he hasn't voted yet and forward him to the voting page.

    Put your client php file in here.
    Code:
    <?php    require_once('api.php');
    ?>
    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta http-equiv="content-type" content="text/html; charset=utf-8">
            <title>{hotelName} - Client</title>
            
            <link rel="stylesheet" href="{url}/app/tpl/skins/habbo/styles/client.css" type="text/css">
            <link rel="stylesheet" href="{url}/app/tpl/skins/habbo/Template/css/Style2.css" type="text/css">
            
            <script type="text/javascript" src="{url}/app/tpl/skins/habbo/js/swfobject.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/habbo/js/Clients.js"></script>
            <script type='text/javascript' src='/app/tpl/skins/habbo/Template/JS/Jquery.js'></script>
            <script type='text/javascript' src='/app/tpl/skins/habbo/Template/JS/JQueryUI.js'></script>
            <script type="text/javascript">        
                var BaseUrl = "{swf_folder}";
                var flashvars =
                {
                    "client.starting" : "Please wait, {hotelname} loading",
                    "hotelview.banner.url" : "{url}/game/rs4.php",
                    "client.allow.cross.domain" : "1", 
                    "client.notify.cross.domain" : "0", 
                    "nux.lobbies.enabled" : "true", 
                    "connection.info.host" : "{server_ip}", 
                    "connection.info.port" : "{server_port}", 
                    "site.url" : "{url}", 
                    "url.prefix" : "{url}", 
                    "client.reload.url" : "{url}/client", 
                    "client.fatal.error.url" : "{url}/me", 
                    "client.connection.failed.url" : "{url}/me", 
                    "external.variables.txt" : "{external_vars}", 
                    "external.texts.txt" : "{external_texts}", 
                    "external.override.texts.txt" : "(Vars Go Here)", 
                    "external.override.variables.txt" : "(Vars go here)", 
                    "external.figurepartlist.txt" : "(Game data / furnidata go here)", 
                    "productdata.load.url" : "{product_data}", 
                    "furnidata.load.url" : "{furni_data}", 
                    "use.sso.ticket" : "1", 
                    "sso.ticket" : "{sso}", 
                    "processlog.enabled" : "0", 
                    "flash.client.url" : BaseUrl, 
                    "user.hash" : "", 
                    "has.identity" : "1",
                    "flash.client.origin" : "popup",
                    "logout.url" : "{url}/me", 
                    "account_id" : "", 
                    "logout.disconnect.url" : "{url}/me", 
                };
                var params =
                {
                    "base" : BaseUrl + "/",
                    "allowScriptAccess" : "always",
                    "menu" : "false"                
                };
                swfobject.embedSWF(BaseUrl + "/Habbo.swf", "client", "100%", "100%", "10.0.0", "{swf_folder}/expressInstall.swf", flashvars, params, null);
                </script>
        </head>
        
        <body>
            <div id="client"></div>
        
        </body>
    </html>
    - - - Updated - - -

    Quote Originally Posted by Terrum View Post
    Did you set the full link (not just 'client.php') to your client as the redirector after voting on your settings of the API? When you login to your account on findretros.com you need to set the redirector to the full link of your hotel's client, which is under some obscure settings.
    The return url is my hotel /client
    This happens before people even vote man. When they click enter client, then it says " This page has a redirected loop " they didn't even play the game yet.

    - - - Updated - - -

    Okay so now for my friend it says website is offline, but it's only for him, not redirected loop.
    Here's the code: http://pastie.org/private/xxkv0ticycrch7vqgefziq#9,18

  5. #5
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: How to fix 'Redirected Loop' issue

    Code:
    <?php    require_once('api.php');
    ?>
    To:

    Code:
    <?php    if(!isset($_GET['novote']]){require_once('api.php'); }
    ?>
    and have the voting thing return to /client?novote after people have voted.

  6. #6
    Member akajsmoove is offline
    MemberRank
    Aug 2014 Join Date
    28Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by The General View Post
    Code:
    <?php    require_once('api.php');
    ?>
    To:

    Code:
    <?php    if(!isset($_GET['novote']]){require_once('api.php'); }
    ?>
    and have the voting thing return to /client?novote after people have voted.
    Okay, added it but what to do with this issue: Okay so now for my friend it says website is offline, but it's only for him, not redirected loop.
    Here's the code: http://pastie.org/private/xxkv0ticycrch7vqgefziq#9,18

    Nvm, he still has redirected loop :S
    Last edited by akajsmoove; 09-11-14 at 06:45 PM.

  7. #7
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: How to fix 'Redirected Loop' issue

    Then idk what the problem is. Might be some other code in your CMS. Can't help you with that.

    I never used voting APIs as I think it is useless and the voting sites earn tons of money through their ads.

  8. #8
    www.Epic Hosts.co.uk Terrum is offline
    Grand MasterRank
    Jun 2008 Join Date
    EpicHosts,co.ukLocation
    1,322Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by akajsmoove View Post
    The return url is my hotel /client
    Did you try set the return URL to your full client link, instead of just /client?

  9. #9
    Member akajsmoove is offline
    MemberRank
    Aug 2014 Join Date
    28Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by The General View Post
    Then idk what the problem is. Might be some other code in your CMS. Can't help you with that.

    I never used voting APIs as I think it is useless and the voting sites earn tons of money through their ads.

    So tried your code again, and client would just be a white page, wouldn't even load.
    Messed around with the code, changed it to this:

    <?php
    if(isset($_POST['novote'])){
    require_once('api.php');
    }
    ?>

    now it doesnt even give a vote option or anything, just loads client ugh

  10. #10
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: How to fix 'Redirected Loop' issue

    I said !isset

    learn to copy paste.

  11. #11
    Member akajsmoove is offline
    MemberRank
    Aug 2014 Join Date
    28Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by The General View Post
    I said !isset

    learn to copy paste.
    Lol, why being a dick?
    I copy and pasted your CODE fully and it blanked the page..

  12. #12
    Sorcerer Supreme TardisHotel is offline
    Member +Rank
    Mar 2013 Join Date
    404Posts

    Re: How to fix 'Redirected Loop' issue

    The redirect loop is because certain internet companies don't allow it. They are mainly a few American providers and one Australian, it is caused from, them firstly being redirected to findretros and then redirected back. There is not alot you can do about this, if you put voting on your client instead of your index it may help but all hotels suffer from this problem. I believe Boon is using SSL to help with that problem. Some days no one gets the redirect loop at all, it;s pot luck unfortunately.

  13. #13
    Grand Master Sledmore is offline
    Grand MasterRank
    Jun 2009 Join Date
    1,133Posts

    Re: How to fix 'Redirected Loop' issue

    What @TardisHotel said is right.

    If the user is being redirected from your hotel over http and not https then a redirect loop may occur as the user may be sent over a proxy by their ISP (from what we figured out). Easiest way to fix this is to enable SSL. You could even just use a CloudFlare page rule (if you're using CloudFlare) for the job.

  14. #14
    Member akajsmoove is offline
    MemberRank
    Aug 2014 Join Date
    28Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by Sledmore View Post
    What @TardisHotel said is right.

    If the user is being redirected from your hotel over http and not https then a redirect loop may occur as the user may be sent over a proxy by their ISP (from what we figured out). Easiest way to fix this is to enable SSL. You could even just use a CloudFlare page rule (if you're using CloudFlare) for the job.
    Alright so, Ill set up the SSL aka HTTP / HTTPS and enable it on Cloudflare PRO, this issue should be resolved?

  15. #15
    www.Epic Hosts.co.uk Terrum is offline
    Grand MasterRank
    Jun 2008 Join Date
    EpicHosts,co.ukLocation
    1,322Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by akajsmoove View Post
    Alright so, Ill set up the SSL aka HTTP / HTTPS and enable it on Cloudflare PRO, this issue should be resolved?
    Try it. We can't confirm for you.

  16. #16
    Unknown Place MaxZeus is offline
    Grand MasterRank
    Mar 2013 Join Date
    592Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by akajsmoove View Post
    Alright so, Ill set up the SSL aka HTTP / HTTPS and enable it on Cloudflare PRO, this issue should be resolved?
    The redirect loop, happens because there is a 'logic loop' in your website files or settings.

    What does this means ? It works like this :

    1) user try to access your website via address : "http://..."
    2) your website try to redirect user to address : "https://..."
    3) the user now access your website via address : "https://..."
    4) due to some bad configuration or wrong code in website files, your website still try to redirect user to : "https://..."
    5) repeat steps 3 and 4 forever, until the browser returns "redirect loop error".

    You can consider, checking your .htaccess file for bad url rewrite rules too.

    Max.

  17. #17
    Member akajsmoove is offline
    MemberRank
    Aug 2014 Join Date
    28Posts

    Re: How to fix 'Redirected Loop' issue

    Quote Originally Posted by MaxZeus View Post
    The redirect loop, happens because there is a 'logic loop' in your website files or settings.

    What does this means ? It works like this :

    1) user try to access your website via address : "http://..."
    2) your website try to redirect user to address : "https://..."
    3) the user now access your website via address : "https://..."
    4) due to some bad configuration or wrong code in website files, your website still try to redirect user to : "https://..."
    5) repeat steps 3 and 4 forever, until the browser returns "redirect loop error".

    You can consider, checking your .htaccess file for bad url rewrite rules too.

    Max.

    Thanks, I will have a look.



Advertisement