![]() |
![]() |
![]() |
||||
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 |
Confirmed User
Join Date: May 2005
Posts: 443
|
Tip: Affiliate link redirects - Earn more money
It's friday and im in a good mood so thought i'd share this little tip with for any blog owners/site owners that have a lot of affiliate links on their pages.
If you aren't already redirecting them, well you should be and here's how: Create a PHP file with the following code and your desired affiliate code/text. PHP Code:
Then in your .htaccess file (create one if you dont have one) add: Code:
RewriteEngine On RewriteRule ^link/([/_0-9a-zA-Z-]+)$ link.php?id=$1 To include that link on my pages i would just add a link to: http://www.domain.com/link/reality-kings When clicked that will redirect to the sponsor link ![]() Remember to block the /link folder in your robots.txt file Benefits of this technique: 1. SEO benefits - google isnt fond of too many affiliate codes on landing pages and it also helps prevent bleeding or diluting of your pagerank score. 2. Prevent any pc tools or other malware stripping out or replacing your affiliate code. 3. Earn more money! for example today's nastydollars bonus day all i did was alter a few URL's in the link.php file and now all my inthevip/vipcrew/ links all go through the reality kings tours. Tomorrow i can just re-edit that file rather than the 100's of hard coded links on my sites. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: Jun 2005
Location: 127.0.0.1
Posts: 27,047
|
thanks. i was wondering how to do that.
__________________
Make Money
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: May 2005
Posts: 443
|
Note:
Might not have been clear but in the link.php file you need to have a ',' after every line in url code except for the last line! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Registered User
Join Date: Jul 2007
Posts: 69
|
Nice tip!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: May 2007
Posts: 3,119
|
thats cool! thanks
__________________
OnProbation Links Directory | OnProbation Design Services | OnProbation Cash |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jul 2006
Location: Where the wild things are
Posts: 761
|
seems quite complicated to me, why not just put a simple redirect in htaccess?
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Affiliate
Industry Role:
Join Date: Oct 2002
Location: Icq: 94-399-723
Posts: 24,433
|
Quote:
thank you very much for the code appreciated! ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Nov 2003
Location: Argentina
Posts: 1,105
|
Didn't worked with me
It shows a 404 error always...
__________________
email: admin {AT} estomped [DOT] com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
Join Date: Dec 2006
Posts: 23,400
|
that's what I do... no need for extra overhead processing some PHP file...every cycle counts!
__________________
i like waffles |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Join Date: Dec 2001
Location: London Town
Posts: 2,924
|
Quote:
![]()
__________________
ICQ 1454 81 522 | ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
|
I'd love for everyone to adopt this.
Would increase the weight on my referal codes bigtime.
__________________
LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250 Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month. AmeriNOC - Proudly hosted @ AmeriNOC! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
|
Take the above PHP code, modify it like this: Code:
<?php $path = 'http://www.YourSponsor.com/?affiliate=You&site=NastySite' header('Location: ' . $path); ?> ... and keep one PHP file like this for each site promoted in a central directory, like /links, and call them accordingly ![]() Doesn't cut out PHP usage... but it'll save some cycles ;)
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
|
*NO* PHP at all btw:
Create subdirectories for each "promotion target" in the /links directory, like /links/YourSponsor-NasySite/ ... ... and stuff this into each subdirectory's .htaccess (this will need editing each subdir's htaccess for the appropiate redirection target): Code:
RewriteEngine On RewriteRule ^.*$ http://www.YourSponsor.com/?affiliate=You&site=NastySite
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
|
Actually scratch my previous post, and use this instead:
(corrected a couple of errors, including making it slightly more SE friendly) Code:
RewriteEngine On RewriteRule ^$ http://www.YourSponsor.com/?affiliate=You&site=NastySite [R=301,L]
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Join Date: Feb 2005
Location: SD/OC/LA
Posts: 1,917
|
nice tip.
Take it to the next level and create a database of the links. So then you can have a nice control panel that handles it all. ![]() ![]() ![]()
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ![]() ![]() =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
|
bDok: niiice thinking!
![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
aka K-Man
Industry Role:
Join Date: Oct 2001
Location: The Gutter
Posts: 29,292
|
its a very good tip... mainly the reasoning on how its easy to swap out hundreds of links easily.... although you could search and replace in your database too if need by...
i've always liked this 100% automatic plugin; http://w-shadow.com/blog/2007/07/28/...for-wordpress/ I know it doesnt give you easy control over where the links point, but i have a technical background and a couple programmers on staff that im sure would easily search and replace (grep) if i ever needed... never needed to though.
__________________
Crypto HODLr Crypto mining Angel investor |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Confirmed User
Join Date: Dec 2001
Location: London Town
Posts: 2,924
|
Awesome tips. Thanks Diligent.
I might well be dreaming that this happened - a useful thread on GFY. Wow.
__________________
ICQ 1454 81 522 | ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
The Dupre Pimp
Join Date: Feb 2008
Location: Koh Samui
Posts: 6,677
|
great tip,was searching for something like this
![]()
__________________
Read TOS for signature rules |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
Confirmed User
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
|
Thanks for the thanks guys, useful stuff is always nice eh?
![]() (Keep gratiuty in store for ionic as well though, he initiated this stuff here) Which brings me to correct my first post in this thread, can't believe how sloppy I was with the code hehe: If You wanna go the PHP route, the way I suggested, I missed an important semicolon.. so here we go again, fully correct this time: Code:
<?php $path = 'http://www.YourSponsor.com/?affiliate=You&site=NastySite'; header('Location: ' . $path); ?>
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
Confirmed User
Industry Role:
Join Date: May 2003
Posts: 3,765
|
so google prefers redirects over ref codes?
__________________
flexx [dot] aeon [at] gmail |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
Too lazy to set a custom title
Join Date: Dec 2006
Posts: 23,400
|
Sure...
RewriteEngine on Options +FollowSymlinks RewriteRule ^go/ladyboygold/ http://join.ladyboygold.com/track/NzkwOjk6Ng/ [R=301,NC] then go to http://www.yourdomain.com/go/ladyboygold/ and apache automatically redirects to the url above. I've tested this with join links, test signups and such and this method works the best. Granted the .htaccess file can get to be a bit large, its still better than running PHP that essentially does the same thing.
__________________
i like waffles |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
In the long run, the ionic method is far better from an updating standpoint when you run a ton of sites on many different servers... here's another tip on how to use this (been doing this myself for 3 years now)... If you have multiple sites on one server, create a common directory somewhere...
example. /www/domain1.com/html /www/domain2.com/html /www/domain3.com/html /www/domain4.com/html /www/links <- create this one. Now put that links.php file in that directory. i.e.: /www/links/links.php Now for each of your sites, you simple put a links.php file in there that includes that core file (as well as the .htaccess file). i.e. /www/domain1.com/html/links/links.php /www/domain2.com/html/links/links.php /www/domain3.com/html/links/links.php /www/domain4.com/html/links/links.php /www/links/links.php <- core file the links.php file for each domain just has the following in it: <?php @include('/www/links/links.php'); ?> Now you only have to update one file per server and ALL your sites are updated at once. That code can be expanded like crazy to add in campaign tracking per site, log the clicks or whatever... the only issue is that you will end up with 1000s of links in that file which will make it very big.. At that point you need to start breaking it up into sections. Could be done per sponsor. eg: these ones contain all the links: /www/links/nastydollars.php /www/links/bangbros.php /www/links/topbucks.php then each site could be /www/domain1.com/html/links/nd/links.php /www/domain1.com/html/links/bbo/links.php /www/domain1.com/html/links/tb/links.php And those links files include the approriate sponsor core link file. You'll need to adjust the .htaccess file for the correct path. Couple other things.. You should send a proper 404 if the script fails etc. So I'd mod it like this and also do a couple things to try and cut down on the size of the file when you start adding more and more links.. Code:
<?php $key = (isset($_GET['id']) ? trim($_GET['id']) : ''); if( $key == '' ){ do404(); } $links = array( 'reality-kings' => 'www.realitykings.com/main.htm?id=fapgallery&p=clean', 'college-fuckfest' => 'signupsb.triplexcash.com/cgi/click?account=560307&site=2&program=2' ); if( isset($links[$key]) ){ $url = (substr($links[$key], 0, 4) == 'http' ? $links[$key] : 'http://'.$links[$key]); header("Location: $url"); exit; } do404(); function do404(){ header('HTTP/1.1 404 Not Found'); ?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>404 Not Found</TITLE> </HEAD><BODY> <H1>Not Found</H1> The requested URL was not found on this server. </BODY></HTML> <?php exit; } ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
Too lazy to set a custom title
Join Date: Dec 2006
Posts: 23,400
|
The same can be done for custom galleries... just put symbolic links to your other image directories and then put in different header/footer images in that specific virtual directory and you've duplicated the content without wasting space
![]()
__________________
i like waffles |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
Unregistered Abuser
Industry Role:
Join Date: Oct 2007
Posts: 15,547
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
Confirmed User
Join Date: Jul 2006
Location: NoHo
Posts: 5,970
|
I'm shocked! An actual useful thread in GFY!! .............the world is coming to an end.......bookmarked since this happens once every million posts
__________________
![]() ICQ: 266990876
|
![]() |
![]() ![]() ![]() ![]() ![]() |