Hey guys I'm new to the forum so whats up from Scotland I have my own website (which I didn't build) and it's basically a lead generation site for my business. An opportunity has come up to work with some affiliates/referrers and I need unique URL's for them so I know that they brought the client to the site. If my home page is www.example.com and Mr Smith is my affiliate I would like the URL Mr Smith uses to be something like 'www.example.com/mrsmith' but the URL should redirect to the homepage for the user to decide if they would like our services. How can I do this?
you can do this with php headers. on www.example.com/mrsmith have this code <html> <?php header('Location: http://example.com/'); exit; ?> </html> Code (markup):
well, all of that can be scripted. It depends how you want to do it, if many people will be using it then you'll want to code it. I can help
I would use getData for that -- rather than playing stupid games with redirects and wasting time on extra handshakes. (which REALLY seems to be a sick time-wasting bandwidth wasting fad right now.) Just have it something like: example?referrer=mrSmith then in the PHP you can just trap: $_GET['referrer'] To get the value of where it came from. You could also use $_SERVER['HTTP_REFERER'] to find out the URL that sent to your page, then you'd not even need a fancy URL for it. Seriously, what the devil is with all these people wasting the extra handshake and server overhead on using header/location? Is there some dumbass tutorial or new book written by some ignorant twit promoting that or something? I've seen it in dozens of posts within the past two weeks when I'm used to that being called something NOT to do.