Skip to content

Menu
  • Home
  • Resources
  • Affiliate Marketing
    • Marketing Strategies
    • Building Curiosity to Drive Sales
    • Steps to being Successful in Anything…
  • My Chats With Alex (ChatGPT)
  • How do I create a website?
  • Privacy Policy
  • The Bloggy Bits
  • Checkout My YouTube Channels
  • The Stuff No One Told You Online
    • Starting off on the Right Foot.
    • Know Your Surroundings.
Menu

How to create an Affiliate link – the old way

Posted on June 14, 2024August 24, 2024 by Tim Brownlaw

So in my previous post Time to do a little redirect I explained that I have set the folder structure up to allow affiliate links.

So the code I use in each folder contains a file called index.php with the code like…

<?php
header("location: affiliate_link_url ");
exit();

Where affiliate_link_url is the actual affiliate link of the program/product I am promoting.

Or if you want to use HTML you could use something like

<meta http-equiv=”refresh” content=”delay_time; URL=affiliate_link_url” />

Being a PHP Programmer, I just like the PHP version. PLUS it will allow me to add in some magic down the track… Stay tuned for that one!

The actual proper way is to read the URL and look it up in a Database for the redirect. This allows you to do all sorts of fun stuff like tracking etc. Plus it lets you change things up a bit. But in the case of a Page Not Found or 404 Error, you can throw up a page with all your links and little descriptions associated with each to give them something… or have a default redirect in the case a “program” falls out of favour and you still have active links out there…

The hard part is never the programming, that’s super simple part. The hard part is working out what you want.

Tim Brownlaw
Tim Brownlaw

I am an avid Website developer and Affiliate Marketer.
I created my First Website back in 2001 using Frontpage (yes that old…) which quickly led me into Hand coding HTML and CSS.
So over time I got a bit handy with custom PHP scripts and MySQL Database Design and not forgetting javascript.
So, If you ever have any questions – except for “what are the winning lotto numbers” I will do my best to help when I can.

 

Recent Posts

  • So… You’ve Been Told to “Use Facebook”
  • Who is Your Target Audience?
  • I really need to just start writing on here.
  • And then along came Facebook
  • Overclocked, Not Overwhelmed:

Recent Comments

No comments to show.

©2026 | Built using WordPress and Responsive Blogily theme by Superb
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}