![]() | | ||||||||
| | #1 |
| Warrior Member Join Date: Apr 2008
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
|
I am working on creating some affiliate links on one of my blogs and in some ebooks with many more to come. They work fine, but I always hear how much better it is to have redirects on them so they look nicer. I have found instructions to do this by searching Google, but they are all "above my head." Can someone tell me a very simple way to do this? With complete instructions written for a very NON-programmer? I do use Dreamweaver. Thanks in advance! Jeanne |
| | |
| | #2 |
| Happily Self-Employed War Room Member Join Date: Jan 2007 Location: Philadelphia, PA
Posts: 797
Thanks: 16
Thanked 345 Times in 53 Posts
|
There are three ways to redirect someone from one URL to another: 1) Client side with a meta tag in the head of the HTML. Make a page with the URL you want, and put a meta tag in the <head> section redirecting to the affiliate URL: HTML Code: <meta http-equiv="refresh" content="0;url=http://example.com/affiliate.php?cid=12345"> HTML Code: <script type="text/javascript"> <!-- window.location = "http://www.example.com/affiliate.php?cid=12345" //--> </script> Code: <?php
header("Location: http://www.example.com/affiliate.php?cid=12345");
exit;
?> |
| | |
| | |
| | #3 |
| Warrior Member Join Date: Apr 2008
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
|
I had found some info on Google about using the .htaccess file to do this, so I had gotten this far before I saw your response. Perhaps you can help me from here. This is the coding I got from Commission Junction (with changed affiliate numbers): <a href="http://www.dpbolvw.net/click-4353333-77788888" target="_blank"> <img src="http://www.awltovhc.com/image-4353333-77788888" width="120" height="60" alt="" border="0"/></a> I copied this code to my blog. The link and image shows up fine. When I click on the image, it goes to cooking.com and the URL says: http://www.cooking.com/?ref=http%3A%...grandma.com%2F It is actually on one line. I don't want all those ugly numbers to show, so I tried using my .htaccess file. I have this line in my .htaccess file (it is all on one line): redirect 301 /goodcooking http://www.dpbolvw.net/click-4353333-77788888 I saved it and uploaded it. I thought that when I now selected the image for cooking.com that the URL would show , but it still shows all the ugly numbers: I must be missing something here... Am I supposed to put something different in the recipe site other than the code I was given from Commission Junction? I am so confused. Help!! Thanks, and remember, please give me real basic info - I am not a programmer. Jeanne |
| Last edited by lakewaytexas; 09-15-2008 at 05:11 PM. Reason: code resolved | |
| | |
| | #4 |
| Warrior Member Join Date: Apr 2008
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
|
I see that my link resolved when I didn't want it to! Hopefully you can figure out what I mean...
|
| | |
| | #5 |
| Happily Self-Employed War Room Member Join Date: Jan 2007 Location: Philadelphia, PA
Posts: 797
Thanks: 16
Thanked 345 Times in 53 Posts
|
You set a rule that when Apache gets a request for the URI /goodcooking on your site, it should send a 301 Permanently Moved header and redirect to the affiliate link. That doesn't change your HTML. Now you need to link the ad to /goodcooking instead of directly to the affiliate URL now. |
| | |
| | |
| | #6 |
| Warrior Member Join Date: Apr 2008
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
|
I changed what I had in the blog to http://www.recipesfromgrandma.com/goodcooking instead of the code I got from Commission Junction. I thought that would do the trick, but now I get this error message: Not Found The requested URL /goodcooking was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. --- There is a lot of stuff in the .htaccess file for the blog (much more than shown here). I tried putting this line at the top of the file, and it disappeared after I saved it. I tried putting it at the bottom of the file, and it disappeared again. This time I put it here: # BEGIN WordPress redirect 301 /goodcooking http://www.kqzyfj.com/click-3136013-10377603] <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d Is that the right place for that line of code? Why would it disappear after I saved it? Thanks again. Jeanne |
| | |
| | #7 |
| Active Warrior War Room Member Join Date: Apr 2007 Location: , , United Kingdom.
Posts: 98
Thanks: 1
Thanked 5 Times in 5 Posts
|
I dont see the point in re-directing unless you want to count the clickthroughs. If all you want to do is hide the affiliate link then you might as well just cloak your links. If you want to track them theres a free little script called PHP Click Counter...Im not affiliated with these at all but I have used it a few times, works great. Click counter and download counter |
| | |
| | |
| | #8 |
| Active Warrior War Room Member Join Date: Apr 2007 Location: , , United Kingdom.
Posts: 98
Thanks: 1
Thanked 5 Times in 5 Posts
|
I dont see the point in re-directing unless you want to count the clickthroughs. If all you want to do is hide the affiliate link then you might as well just cloak your links. If you want to track them theres a free little script called PHP Click Counter...Im not affiliated with these at all but I have used it a few times, works great. Click counter and download counter |
| | |
| | |
![]() |
|
| Tags |
| affiliate, affiliate links, helpp, links, redirect, redirects |
| Thread Tools | |
| |
![]() |