any wordpress plugin to redirect just part of the traffic ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klinton
    So Fucking Banned
    • Apr 2003
    • 8766

    #1

    any wordpress plugin to redirect just part of the traffic ?

    like: 15 %, 25 %, etc. etc.

    thx
  • sandman!
    Icq: 14420613
    • Mar 2001
    • 15431

    #2
    you could do that with most traffic trading scripts
    Need WebHosting ? Email me for some great deals [email protected]

    Comment

    • Denny
      Too lazy to set a custom title
      • Feb 2005
      • 17393

      #3
      Bump for you

      Comment

      • just a punk
        So fuckin' bored
        • Jun 2003
        • 32393

        #4
        You can order a custom one: cyberseo@cyberseo.net
        Obey the Cowgod

        Comment

        • klinton
          So Fucking Banned
          • Apr 2003
          • 8766

          #5
          I use wordpress, not traffic trading script
          I tried to "hack it" by editing index.php and putting there random php array...and put as one of the options "normal site" with redirect to site.php instead of index.php
          however, the problem is that now "normal" site doesnt load at all, there are just redirects...like wp_header.php call wouldnt work in file different than index.php....why ????
          <?php

          $urls[] = "http://www.originalsite.com/site.php";
          $urls[] = "http://www.redirect1.com";
          $urls[] = "http://www.redirect2.com";
          $urls[] = "http://www.originalsite.com/site.php";

          srand ((double) microtime( )*1000000);
          $random = rand(0,count($urls)-1);

          header("location:" . $urls[$random]);
          exit;
          ?>

          Originally posted by sandman!
          you could do that with most traffic trading scripts

          Comment

          • freecartoonporn
            Confirmed User
            • Jan 2012
            • 7683

            #6
            dont know about wp, this can be done in plain php.

            e.g.
            php - how to redirect a % of traffic to different websites? - Stack Overflow

            you just need to implement it in wp.

            okie., you have already sorted that out, maybe someone familiar with wp can help.
            SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean

            Comment

            • j3rkules
              VIP
              • Jul 2013
              • 22111

              #7
              Originally posted by CyberSEO
              You can order a custom one: cyberseo@cyberseo.net

              Comment

              • klinton
                So Fucking Banned
                • Apr 2003
                • 8766

                #8
                bump for working solution....

                Comment

                • sarettah
                  see you later, I'm gone
                  • Oct 2002
                  • 14297

                  #9
                  Originally posted by klinton
                  bump for working solution....
                  With what you had, change it up a touch and try this:

                  <?php

                  $urls[] = "";
                  $urls[] = "http://www.redirect1.com";
                  $urls[] = "http://www.redirect2.com";
                  $urls[] = "";

                  srand ((double) microtime( )*1000000);
                  $random = rand(0,count($urls)-1);

                  if(!empty($urls[$random]))
                  {
                  header("location:" . $urls[$random]);
                  exit;
                  }

                  ?>

                  That way it should redirect into one of the other urls or drop into the page like normal. I would think that would work. Don't know what the SEs would think of it.

                  Edited in: I just dropped that into the top of one of my wife's blogs index.php and it worked fine. It does not give you the control by % but it does do the redirect. You could just do a little file read and keep track by counter of how many times you went to each url pretty easy to get that control.


                  .
                  All cookies cleared!

                  Comment

                  • fris
                    Too lazy to set a custom title
                    • Aug 2002
                    • 55679

                    #10
                    Originally posted by klinton
                    like: 15 %, 25 %, etc. etc.

                    thx
                    you could hook into a filter, and use the wp_redirect function.
                    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                    Comment

                    • fris
                      Too lazy to set a custom title
                      • Aug 2002
                      • 55679

                      #11
                      Code:
                      add_action('template_redirect', 'custom_redirect_url');
                      
                      function custom_redirect_url() {
                              if(is_home() ) {
                                      wp_redirect('http://google.ca');
                                      exit();
                              }
                      }
                      this example here would redirect the main domain

                      you would just have to adapt your function (the redir algorithm or how often into this)

                      this would go in your functions file
                      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                      Comment

                      • fris
                        Too lazy to set a custom title
                        • Aug 2002
                        • 55679

                        #12
                        Code:
                        add_action('template_redirect', 'custom_redirect_url');
                        
                        function custom_redirect_url() {
                        
                            $urls[] = "http://www.originalsite.com/site.php";
                            $urls[] = "http://www.redirect1.com";
                            $urls[] = "http://www.redirect2.com";
                            $urls[] = "http://www.originalsite.com/site.php";
                        
                            srand ((double) microtime( )*1000000);
                            $random = rand(0,count($urls)-1);
                            $url = $urls[$random];
                        
                            // adapt your % redirect here if original isnt yours
                            wp_redirect($url, 301);
                            exit();
                        }
                        you would just need to adapt the % function
                        to redir
                        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                        Comment

                        • klinton
                          So Fucking Banned
                          • Apr 2003
                          • 8766

                          #13
                          thanks guys ! I will play with it later ;-)

                          Comment

                          • LatinaCamChat
                            Confirmed User
                            • Jul 2015
                            • 571

                            #14
                            what is your reasoning for wanting to do this within wordpress core (which will get overwritten quickly by wordpress's never ending update) instead of using one of the many traffic trading scripts that are compatible with wordpress or even often come in wordpress plugin format?

                            Comment

                            • fris
                              Too lazy to set a custom title
                              • Aug 2002
                              • 55679

                              #15
                              Originally posted by LatinaCamChat
                              what is your reasoning for wanting to do this within wordpress core (which will get overwritten quickly by wordpress's never ending update) instead of using one of the many traffic trading scripts that are compatible with wordpress or even often come in wordpress plugin format?

                              theme wont be updated even when wp is, always use a child theme.
                              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                              Comment

                              • LatinaCamChat
                                Confirmed User
                                • Jul 2015
                                • 571

                                #16
                                Originally posted by fris
                                theme wont be updated even when wp is, always use a child theme.
                                themes also update sometimes though

                                child theme is fine I guess, just pretty sure there must be an easy plugin to do this already

                                Comment

                                • klinton
                                  So Fucking Banned
                                  • Apr 2003
                                  • 8766

                                  #17
                                  gracias amigo, I will check out soon that traffic trading script "Compatible" with wordpress...but my guts say that it will totally fuck up my wordpress site ;-)

                                  Originally posted by LatinaCamChat
                                  what is your reasoning for wanting to do this within wordpress core (which will get overwritten quickly by wordpress's never ending update) instead of using one of the many traffic trading scripts that are compatible with wordpress or even often come in wordpress plugin format?

                                  Comment

                                  Working...