Redirect Code for Link Farms

Redirect Code for Link Farms

Directions:

First: Open the template file for the type of redirect that you wish to use. Then save the file as a text file with a new name before replacing the code.

Make a Backup

Make a backup in case you overwrite this file. Or, make the template “Read Only.”

You will name the text file with the destination name and one of three extensions:

  • .php
  • .html
  • .js

Caution: Use only lower case letters because file names are case sensitive on Web servers, but not on your local computer.

PHP Redirect

Here is the code for a PHP 301 (Page Permanently Moved) Redirect:

php-301-redirect

Sample code below for…clasechevere.php

php-301-redirect-sample

HTML Redirect

Here is the code for an HTML 302 (Page Permanently Moved) Redirect:

html-302-redirect

Sample code below for…clasechevere.html

html-302-redirect-sample

Hide Referring Link Redirect

Here is the code for an HTML Redirect that hides the link code from the Destination’s Address Bar:

hide-link-html-redirect

Sample code below for…clasechevere.html

hide-link-html-redirect-sample

Javascript Redirct

Here is the code for a Javascript Redirect:

Don’t bother with this since mobile devices do not use Javascript.

javascript-redirect

Sample code below for…clasechevere.js

javascript-redirect-sample