1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Using redirects in Wordpress

Discussion in 'Blogging' started by Biscut, Mar 19, 2009.

  1. Biscut

    Biscut Regular Member

    Joined:
    Feb 9, 2009
    Messages:
    329
    Likes Received:
    259
    I'm hoping someone here can help me as my hosting company couldn't figure it out. I checked the forums but haven't seen this posted. I apologize if it is a duplicate.

    I want to set up redirect links to my affiliate links.
    Example: myblog.com/health and have it redirect to my cpa or clickbank affiliate link.
    I have created the redirect in my cpanel. The problem is it takes me to a 404 error on my blog, not to the affiliate page.

    This is my first wordpress blog so I'm somewhat confused as how to do this.

    The only plugin I am currently using is Platinum SEO and my permalinks are set to postname.

    Many thanks in advance!
     
  2. 195471

    195471 Regular Member

    Joined:
    Oct 11, 2008
    Messages:
    417
    Likes Received:
    260
    Do you have a folder named "health" with an index.html or index.php file in it? If not, try that and see what happens.
     
    • Thanks Thanks x 1
  3. iamnotlaptop

    iamnotlaptop Junior Member

    Joined:
    Nov 30, 2008
    Messages:
    194
    Likes Received:
    26
    I am sure there is one addon for this. Just search and it is most viewed thread.

    This looks like a dumb question. But how you post a new thread here. I am missing the new thread option. Am i blind or what?
     
  4. iamnotlaptop

    iamnotlaptop Junior Member

    Joined:
    Nov 30, 2008
    Messages:
    194
    Likes Received:
    26
    By the way , if i remember correctly it is in download section.

    All the best
     
    • Thanks Thanks x 1
  5. Biscut

    Biscut Regular Member

    Joined:
    Feb 9, 2009
    Messages:
    329
    Likes Received:
    259
    It says, "new thread" above the threads. It looks like the "Post reply" at the top of this thread.
     
  6. springer98

    springer98 Regular Member

    Joined:
    Dec 6, 2008
    Messages:
    211
    Likes Received:
    250
    Occupation:
    We doeneeeeed no stinkin' yob!
    Location:
    ZRF
    Open up a text editor, like notepad.

    Paste this into it:

    Code:
    <?php
    
    header('Location: affiliatelinkhere');
    
    ?>
    Replace affiliatelinkhere with your affiliate link. (should have been obvious but I take nothing for granted.)

    Save it as whatever you want the page to be named. Ie.; ilikemyaffiliatelinks (no spaces!)

    FTP the file to your server and rename the extension to .php If you have that /health folder on your server and want it to be there, put it there.

    Make your links as follows...

    http://www.myblog.com/health/ilikemyaffiliatelinks.php

    TA-DA!
     
    • Thanks Thanks x 1
  7. Biscut

    Biscut Regular Member

    Joined:
    Feb 9, 2009
    Messages:
    329
    Likes Received:
    259
    That did it. Thank you.

    This is my first blog so I didn't think something this easy would have a plugin for it. I'll look in downloads for it.
     
  8. Biscut

    Biscut Regular Member

    Joined:
    Feb 9, 2009
    Messages:
    329
    Likes Received:
    259
    So the only difference is this will allow you to skip the step of creating the redirect in cpanel. Correct?
     
  9. springer98

    springer98 Regular Member

    Joined:
    Dec 6, 2008
    Messages:
    211
    Likes Received:
    250
    Occupation:
    We doeneeeeed no stinkin' yob!
    Location:
    ZRF
    Correct. In fact, take out that redirect that you created in cPanel.

    This merely adds a page to your site... albeit, an invisible page... that serves to cloak and redirect your affiliate link. You link to it, it redirects to your affiliate offer while inserting your affiliate link.
     
  10. anil2006

    anil2006 Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 12, 2009
    Messages:
    642
    Likes Received:
    203
    USe simple redirect plugin if you want to redirect page.