![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
any wordpress plugin to redirect just part of the traffic ?
like: 15 %, 25 %, etc. etc.
thx |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Icq: 14420613
Industry Role:
Join Date: Mar 2001
Location: chicago
Posts: 15,432
|
you could do that with most traffic trading scripts
![]() ![]()
__________________
Need WebHosting ? Email me for some great deals [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Industry Role:
Join Date: Feb 2005
Posts: 17,232
|
Bump for you
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,381
|
You can order a custom one: cyberseo@cyberseo.net
![]()
__________________
Obey the Cowgod |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
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; ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
|
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
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
VIP
Industry Role:
Join Date: Jul 2013
Posts: 22,112
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
bump for working solution....
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,057
|
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! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,241
|
Code:
add_action('template_redirect', 'custom_redirect_url'); function custom_redirect_url() { if(is_home() ) { wp_redirect('http://google.ca'); exit(); } } 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. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,241
|
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(); } to redir
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
thanks guys ! I will play with it later ;-)
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Industry Role:
Join Date: Jul 2015
Posts: 571
|
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?
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,241
|
Quote:
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Industry Role:
Join Date: Jul 2015
Posts: 571
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
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 ;-)
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |