• sicky_brazz

    (@sicky_brazz)


    Hi, I have kindly been given some code to redirect all logged out users to my home/landing page (with a few page exceptions like ToS & PP etc.)

    However, when I come to load the site in IE, I get:
    •Make sure the web address http://carfreaksunite.com is correct.
    •Look for the page with your search engine.
    •Refresh the page in a few minutes.

    In Chrome:
    This web page has a redirect loop

    In Firefox:
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    Can someone please explain why this is?
    I have been told it is because my site is not on the $world_pages “safe” list (whatever that is..?), I have tried to Google it but can’t find anything of relevance..

    P.S.
    This is the code I was provided with:

    add_action('init','boot_non_users');
    function boot_non_users() {
      $world_pages = array(106,101,105,102,70,82,50,67,103,104);
    
      if (!in_array(get_the_ID(),$world_pages))
         if (!is_user_logged_in())
            wp_redirect('http://www.carfreaksunite.com');
    }

The topic ‘Redirecting issues – site wont load’ is closed to new replies.