View Single Post
Old 09-14-2015, 05:07 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,350
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.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote