Affiliate marketing for beginners

[an error occurred while processing this directive]
| RSS Feed | sitemap | Contact 

» Home » Affiliate links guide »

Affiliate links redirection script

Free PHP script to hide and redirect affiliate links, as mentioned on PHP link redirection examples page, is now ready for download.


  1. Flat file (text) database (MySQL not required)
  2. Search engine spiders will not follow affiliate link (robots.txt included)
  3. Bad Web scanners will not find redirection script (friendly links)
  4. Bad robots are blocked (script + htaccess)
  5. Script is ready to go, FAQ and test page included


Default installation, without customizing script:

  • Unpack archive to some folder on your disk along with folders in archive.
  • Open readme.html for setup instructions and FAQ
  • Edit config.php and change required fields to fit your needs.
  • (optional) Edit database and test.html to test your links , (example links included)
  • Start your FTP program, make required folders on server
  • Upload robots.txt (or copy content to yours) and test.html to root, scripts and database to folders
  • Point your browser to yourdomain/test.html, follow instructions to test all features
  • If your script is working, you will see this page (test url in database)

Customizing script

You can change folder names, name of database file, database fields delimiter (default is pipe), read readme.html for detailed instructions.

Database description

Since it is flat txt file, text database, any text editor is suitable to edit it. Contains only three field. Link ID, what can be any combination of numbers or letters, affiliate or any other url (link), and the third field contains short description of link, for your reference, when editing database.

robots.txt warning

If you already have robots.txt on your server, just edit it and add content from included robots.txt, DO NOT overwrite that file. To be safe, backup it first.

.htaccess uploading instructions

.htaccess is included in archive, no need to edit. When uploading , if you are not sure how your FTP software is handling extensions, rename it to htaccess.txt. After it is uploaded, rename to .htaccess . On that way, you will be sure that htaccess is uploaded using text mode.

Any questions, suggestions? Contact link is top right, but first be sure to read FAQ. Comments are added to script to help beginners in PHP too.

Latest update: robots.txt (see features above) was missing in archive, added to script, edit, modify if necessary, copy content to yours robots.txt or simple upload it if you don't have any.

PHP link redirection script ver. 1.0 (5kb) download (right click and save target/link as...)

Bookmark and Share

to top