The How to of Links and Redirects

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Ok so i’ve done links opening in new windows now it’s time for redirecting links.

There are 2 simple ways to do this and that’s with html or php

First html

Open up your html editor, If you don’t have one you can get a great free website builder here anyway.

so the simple code for html is below

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<html>
<head>
<title> title </title>
<meta http-equiv=”refresh” content=”2;URL=your affiliate url goes here”>
<script>
url=’your affiliate url goes here’;
if(document.images) { top.location.replace(url); }
else { top.location.href=url; }
</script>
</head>
<body> 
<a href=your affiliate url goes here>link text name here</a>…
</body>
</html>

simply place this code into the blank html editor and save using whatever name you like upload to your site and you will get a link like www.yourdomain.com/whateveryoucalledit.com

Now that’s just a simple method that even I can do so i’m sure you can to.

PHP CODE

Now php is a little different but also very easy.  To create a php redirect link you need to use notepad rather than an html editor. What I like to do first though is goto my site and create a new folder for the product I like to promote so say, dogtraining(why it’s always dog training in guides and how to’s I don’t know but didn’t want to break the trend.)

Then open your notepad and paste

<?php
//Redirect Browser
header(”Location:  youraffiliatelinkhere”);
?>

Now save this as index.php and upload to your new folder and you will get a link that looks like:-

www.yourdomain.com/dogtraining  by doing it this way you cut out the html on the end and make it a better looking link

I have a copy of this saved in my files so anytime I need to create a new one I just change the affiliate link and upload to a new folder and away we go.

Now these are 2 very easy ways to get your links redirected there are many others, for file names you could also use names such as likes,uses and recommends but that is up to you.

If you find this helpful or wish to add something to it about redirecting links be sure to leave a comment.

Thanks for your time,

Take it easy,

James Howard

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • MisterWong
  • TwitThis
  • Y!GG
  • Webnews
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • NewsVine