redirecting to an affiliate page

by CDawson Banned
8 replies
Hello everyone, could someone explain how to redirect to an affiliate page using my own domain, does it have to be a .com domain?
#affiliate #page #redirecting
  • Profile picture of the author Zeus66
    No, the domain extension is irrelevant. Can be .com, .net, .org, whatever.

    There are a few ways to do the redirection, but I find the easiest is to use PHP. Don't worry, it's very very simple....

    Use this code:

    HTML Code:
    <?php
    header( 'location: http://url_you_want_to_redirect_to' ) ;
    ?>
    Put that (and only that) in the source code for your page and save the file with .php at the end, instead of .htm or .html. If you want to redirect from your homepage, name the file index.php and upload to your server.

    John
    {{ DiscussionBoard.errors[1076967].message }}
  • Profile picture of the author HiTom
    Or you can go to your domain registrar and forward the domain to the affiliate link. At GoDaddy, when in the domain manager, select your domain and click the Forward icon, you can then put your affiliate link there. It should be almost the same for other registrars I guess.
    {{ DiscussionBoard.errors[1077359].message }}
  • Profile picture of the author CDawson
    Banned
    need some help guys, I just uploaded the new site to hostgator addon domains, now what exactly do I have to do to get the site to automatically foward.
    {{ DiscussionBoard.errors[1078572].message }}
    • Profile picture of the author Spencer Haws
      Originally Posted by CDawson View Post

      need some help guys, I just uploaded the new site to hostgator addon domains, now what exactly do I have to do to get the site to automatically foward.
      Are you trying a little direct linking from Ezine??

      Okay here is exactly what you need to do:

      You need to create a file with the name index.php. This is your home page. Now in order to have this page redirect; simply open the index.php file that is blank, paste in :
      <?php
      header( 'location: http://url_you_want_to_redirect_to' ) ;
      ?>
      as supplied by Zeus 66 (this is what I use as well).

      Now just edit the location part so it is http://www. your affiliate link .com. Just replace the URL in this code with the URL where you want the user to go (your affiliate link). Hope this helps! Best of luck!
      Signature
      Get Long Tail Pro, My Ultimate Keyword Research Software - Quickly Find Profitable Keywords, Check for EMDs, and Analyze the Competition

      My Blog - NichePursuits.com
      - Learn Step by Step How to Build Successful Niche Websites (from someone who has actually done it)!
      {{ DiscussionBoard.errors[1078655].message }}
  • Profile picture of the author timpears
    I feel really stupid as I should know this, but I don't. Where is this .htaccess file that I need to open to do the .httaccess redirect? I assume it is on the server somewhere, but I am not even sure of this.
    Signature

    Tim Pears

    {{ DiscussionBoard.errors[1078632].message }}
    • Profile picture of the author Spencer Haws
      Originally Posted by timpears View Post

      I feel really stupid as I should know this, but I don't. Where is this .htaccess file that I need to open to do the .httaccess redirect? I assume it is on the server somewhere, but I am not even sure of this.
      The .htaccess is usually a hidden file. So you have to make sure that you select the option that allows you to "show hidden files". If you do not select that option, you will not be able to see it. It will be in the same location as your index page.

      All web hosts are a little different for "showing hidden files", but I believe you can usually access that from your cpanel.
      Signature
      Get Long Tail Pro, My Ultimate Keyword Research Software - Quickly Find Profitable Keywords, Check for EMDs, and Analyze the Competition

      My Blog - NichePursuits.com
      - Learn Step by Step How to Build Successful Niche Websites (from someone who has actually done it)!
      {{ DiscussionBoard.errors[1078664].message }}

Trending Topics