I'm just looking for someone to review my code so I can verify my affiliate links will be recorded properly etc: Here is the code that I've placed in a file called vbseo.php in my /public_html/go/ directory <html> <head> <title>vBSEO</title> <meta name="robots" content="noindex,nofollow"> <script>window.location="http://www.vbseo.com/615/";</script> <meta http-equiv="refresh" content="1; url=http://www.vbseo.com/615/"> </head> <body> <p align="center">You are being taken to the correct page. <br>If the page does load after 5 seconds, <a href="http://www.vbseo.com/615/">click here</a>.</p> </body> </html> PHP:
Here’s the most quickest, painless method I’ve found yet to masking affiliate links without installing folders or script programs, etc.: Add this to your .htaccess file: Redirect 301 /folder http://www.domain.com/affiliatelinkgoeshere /folder can be whatever you like. Whenever you link to your affiliate product, use domain.com/folder and your visitors will be redirected to domain.com/affiliatelinkgoeshere. The visitor won’t see your affiliate link on your page at all, they’ll just see "domain.com/folder".
This is the script i use <php if ($m == "affiliatesite") {$link = "http://www.affiliatesite.net/ref.php?owner=123456";} if ($m == "another") {$link = "http://www.another.com/reg/affiliates.asp?AffiliateID=12345";} header("Location: $link"); // jump to hidden url exit(); ?> PHP: Call this jump.php Link like so <a href="jump.php?m=affiliatesite">affiliatesite</a> <a href="jump.php?m=another">affiliatesite B</a> Works 4 me
The code I posted is taken from John Chow's "how to mask affiliate links" blog post. Anyone else know for sure if the code I listed works though?
It should work.... I think this part should mention javascript as the language: <script>window.location="http://www.vbseo.com/615/";</script> However, you have the meta refresh going on, so the javascript is probably not important. <meta http-equiv="refresh" content="1; url=http://www.vbseo.com/615/"> The 1 signifies it will redirect to the url after 1 second. 301 redirects are usually suggested over 302 redirects, ie. using the header("Location: http://mysite.com"), so if you're up for it I would suggest using Jerlene's method.
I don't completely follow you on these steps, but I figure if the way I have works there is no reason for me to change it. I am perfectly fine with creating a .php document to place in a folder for each affiliate link I want to run.
<php if ($m == "affiliatesite1") {$link = "http://www.affiliatesite.net/ref.php?owner=123456";} if ($m == "affiliatesite2") {$link = "http://www.affiliatesite.com/ref.php?owner=123456";} if ($m == "affiliatesite3") {$link = "http://www.affiliatesite.co.uk/ref.php?owner=123456";} if ($m == "affiliatesite4") {$link = "http://www.affiliatesite.org/ref.php?owner=123456";} if ($m == "affiliatesite5") {$link = "http://www.affiliatesite.cc/ref.php?owner=123456";} header("Location: $link"); // jump to hidden url exit(); ?> PHP: <a href="jump.php?m=affiliatesite1">affiliatesite1</a> <a href="jump.php?m=affiliatesite2">affiliatesite2</a> <a href="jump.php?m=affiliatesite3">affiliatesite3</a> <a href="jump.php?m=affiliatesite4">affiliatesite4</a> <a href="jump.php?m=affiliatesite5">affiliatesite5</a> It doesnt make a difference how many there are.. just follow the formula if ($m == "Name") {$link = "Affiliate link";} <a href="jump.php?m=Name">Link text</a> Does that help...
Yeah sorry, The way you described above does works.. If you have lots of affiliate links your gonna have a lot of extra files..
This is the simplest masking code ever: <? header("Location: http://www.youraffiliatelink"); ?> Code (markup): Paste it into notepad, put your link in, and save it as a *.php file. Give it whatever name you want. Put it in a folder named 'go'. Then, you use http://www.yoursite.com/go/whatever.php Yes, you will have one file per link. However, they look nice and clean. None of those question mark thingies. Works perfectly. Make sure your server is running php.
There are at least two "?" in every php file!!!. IMO its better to have it all in one file.. anytime you need to edit any thing its in that one file really how hard is this <?php if ($m == "Name") {$link = "Affiliate link";} header("Location: $link"); // jump to hidden url exit(); ?> PHP: I'm the end i suppose it comes down to which you find the easiest..
i use a couple of forms of affiliate link cloaking first one is profit protector which you can download for free just google it the other is using the browser redirect tool at www.echoecho.com i find the profit protector one is the most useful as it crea5tes a page which uses a frame i think to redirect the user so it appears that you are still on one site when the content is from another www.addme.com had a great url cloaker some time ago but i cant get to it anymore.
How can you set these up so bots will not follow? I have also heard that google will get into your code even if you have the nofollow tag, but I have also heard that bots do not read java. Any advice
Meta Refresh tags work well b/c You can post a message like "please stand by" while your site redirects to the destination. The disadvantages of just forwarding to the link is that your visitor may get confused or become hesitant to leave your site. A swell goodbye message may increase conversions. Works for me!