Easy PHP Redirect Script For Affiliate Links
Easy PHP Redirect Code For Affiliate Links
It’s time to change the way you redirect your pages to affiliate links. Google does not like bare affiliate links and it looks like they also are not big fans of the 301 Redirect.
You can easily create a php redirect that looks like a normal page to the Almighty Google.
Have your affiliate link ready and follow the process below
- Â Paste this code into a text file using notepad
/* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
Next, in the code you pasted in notepad, Replace the http://YourAffilliateLinkHere.com with your actual affiliate link followed by a /
Save it to your desktop as âindex.phpâby selecting âAll filesâ on the drop down menu, not .txt when saving. Be sure that you include the .php extension or it will not work.
See the Image to the right for a graphic on How to save your .php file
Next, create a new folder in your domain root directory or if you use Hostgator You create a new folder with the keyword you are targeting in your public_html folder on your hosting account.
Upload the index.php file to that directory. In naming the directory use a keyword related to the product you are redirecting to.
Upload your âindex.phpâ file into the folder you just created.
You now have a a nice, clean link to use in place of your affiliate link that looks like this: http://mysite.com/recommendedproduct.
That’s all there is to it.Â So far, the search engines cannot read php, so it is a safer way to cloak your links.
I hope you found this easy php redirect tutorial useful. If so please Comment, Like and Share!
Something BIG is brewing at Empower Network! Get in now and be prepared for the upcoming Huge Promotion that will help people who have never made a dime online before earn residual monthly income!
Incoming search terms:
- create directory in php code
- php redirect script
Related Posts via Taxonomies
Like this post? Subscribe to my RSS feed and get loads more!