Home > Programming, Servers & Scripts > Hosting, Servers & Security

Technical question: need help setting up some server redirect (10)


10-11-2011 12:37 AM #1 profchaos911 (Member)
Technical question: need help setting up some server redirect

This is a total noob question, but I just started managing my own server. How do I set up my server so that when I redirect traffic the subid's I put at the end of my server link register on the CPA? I would appreciate a step by step for this.

Thanks guys.


10-11-2011 01:41 AM #2 heavyt (Senior Member)

you are being too vauge, alot of factors go into this.


10-11-2011 03:07 AM #3 zeno (Administrator)

Do you mean you have your own hosting now for your landing pages and want to figure out how to pass subid's (from your incoming links) through to your affiliate links, either during a straight redirect or when you have a full on landing page with a call-to-action button?


10-11-2011 03:32 AM #4 hd2010 (Member)

@zeno : better to get managed hosting, rather than manage your own if not familiar with the technical aspect, any tracking softwares able to pass subid if setup correctly


10-11-2011 05:12 AM #5 profchaos911 (Member)

"Do you mean you have your own hosting now for your landing pages and want to figure out how to pass subid's (from your incoming links) through to your affiliate links, either during a straight redirect or when you have a full on landing page with a call-to-action button? "

Yes, that's exactly what I'm talking about...I want to pass my subid's from my incoming links through to my affiliate links through a straight redirect. You got it exactly right! But, I don't know squat when it comes to this back end stuff, maybe even less than that. If you could explain it to me as clear as you would to a 10 year old I'd appreciate lol


10-11-2011 08:17 AM #6 tijn (Moderator)

the easiest way to pass subids to the offer is just to use tracking. Start with prosper202. Get that installed by your host if you cant do it yourself. p202 will take care of the redirect and making sure the subid is passed. Make sure you watch all their tutorial videos.


10-11-2011 08:20 AM #7 zeno (Administrator)

Quote Originally Posted by hd2010 View Post
@zeno : better to get managed hosting, rather than manage your own if not familiar with the technical aspect, any tracking softwares able to pass subid if setup correctly
I have managed hosting, no way I could deal with the tech aspects of servers!

As for you profchaos911, I had to figure out some of this recently when doing some redirection using php so hopefully this makes sense. What you want to do is create a php file that will serve as your redirection file. E.g. index.php. When you send your incoming links to this you will write them as http://www.domain.com/index.php?subid=something. This ads the subid variable to the link. You can add others, e.g. index.php?subid=test&traffic=pof&demo=women

Right, that's all good. Now what you need to do is have the index.php file be able to pickup these variables and use them somehow. To do this we use the GET function. Pardon all my misnomers i'm probably throwing around, i'm not a coder. In the PHP file this would look like this:

Code:
<?php

   $subid = $_GET['somename'];

..... other stuff

?>
What this will do is get whatever is after ?subid= and will attach this to the variable 'somename'. If in the php file we now write ".$somename" it will input whatever was after ?subid=. So, we can add all these variables/tokens to the incoming URL and then pull them all out using the GET function, and them stick them all back in to some other URL that we are redirecting to. Lets give a longer code version to illustrate:

My incoming URL is ...index.php?subid=test&source=pof&demo=women

Now if i want to redirect this to my affiliate link, with all these variables added as different subids, i would use a php file like this:

Code:
<?php

   $subidvalue = $_GET['subid'];
   $trafficsource = $_GET['source'];
   $demographic = $_GET['demo'];
   header("Location: http://affurl.com/something?CID=xxx&AFID=xxx&Subid=$subidvalue&subid2=$trafficsource&subid3=$demographic");

?>
Of course you might not use such massive variable names, just wanted to differentiate them. The header(Location) part is what redirects, and the GET functions first pull out those variables and then stick them into your redirect link. Once you have this set up you can test the redirection by going your index.php url and adding random variables after the various variables. If in firefox, open the web console (Ctrl+shift+K) and you will be able to watch the links it redirects through.

Hope this helps!

And also yes, as Tjin said, using prosper202 will save you some trouble. I just don't use it as I use a different tracking platform for my Facebook traffic. It is however nice to get you own php redirect working just for the sake of knowing how to do it xD


10-17-2011 01:13 AM #8 hd2010 (Member)

most of the people never learn how to code or how variable passing works as they are too rushing to get things work, if slow down to learn how php and web based application works, most problem can be easily solved. Pull the brake when needed


10-17-2011 06:45 AM #9 profchaos911 (Member)

I ended up going the easy way, and a very helpful way that I've been putting off for a while by getting Tracking 202.


10-17-2011 09:29 AM #10 tijn (Moderator)

Quote Originally Posted by profchaos911 View Post
I ended up going the easy way, and a very helpful way that I've been putting off for a while by getting Tracking 202.
Is that the self hosted version (Prosper 202) ? If not -> get it installed on your server. It will perform much better,


Home > Programming, Servers & Scripts > Hosting, Servers & Security