How To make a multisite redirect???

OgSneakyPimp

Junior Member
Joined
Aug 4, 2008
Messages
164
Reaction score
170
ok i have been redirecting my links using the .htaccess like this

Example

Code:
Redirect /Pimping-these-Hoes/ http://www.Pimpinainteasy.com?Affiliate id
is there a way that i can have it so that 50% of the time it redirects to

Code:
[URL="http://www.pimpinainteasy.com/?Affiliate"]http://www.pimpin-aint-easy.com?affiliateid[/URL]
and the other 50% it redirects to

Code:
[URL="http://www.pimp-in-distress.com/?Affiliate"]http://www.Pimp-in-distress.com?Affiliateid[/URL]
that way every time someone clicks on the link it redirects them to a new affiliate product i am promoting???
 
.htaccess:
Code:
RewriteEngine On 
RewriteRule   /page/.*$ /page/page.php
Then in page.php:
Code:
<?php
if (rand(0,1)) {
  [COLOR=#000000][COLOR=#0000bb]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]'Location: hxxp://www*pimpin-aint-easy.com?affiliateid'[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
} else {
  [COLOR=#000000][COLOR=#0000bb]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]'Location: hxxp://www*Pimp-in-distress.com?Affiliateid'[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
}
?>
Note that /page/ is your directory relative to .htaccess. This is untested but should work.
 
.htaccess:
Code:
RewriteEngine On 
RewriteRule   /page/.*$ /page/page.php
Then in page.php:
Code:
<?php
if (rand(0,1)) {
  [COLOR=#000000][COLOR=#0000bb]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]'Location: hxxp://www*pimpin-aint-easy.com?affiliateid'[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
} else {
  [COLOR=#000000][COLOR=#0000bb]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]'Location: hxxp://www*Pimp-in-distress.com?Affiliateid'[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
}
?>
Note that /page/ is your directory relative to .htaccess. This is untested but should work.

cool thanks ill give it a try ......

hahaha i just found out one of those fake url's above is real hahaha OOops:eek::p:D:):eek::eek:
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock