Using redirects in Wordpress

Biscut

Regular Member
Joined
Feb 9, 2009
Messages
331
Reaction score
244
I'm hoping someone here can help me as my hosting company couldn't figure it out. I checked the forums but haven't seen this posted. I apologize if it is a duplicate.

I want to set up redirect links to my affiliate links.
Example: myblog.com/health and have it redirect to my cpa or clickbank affiliate link.
I have created the redirect in my cpanel. The problem is it takes me to a 404 error on my blog, not to the affiliate page.

This is my first wordpress blog so I'm somewhat confused as how to do this.

The only plugin I am currently using is Platinum SEO and my permalinks are set to postname.

Many thanks in advance!
 
Do you have a folder named "health" with an index.html or index.php file in it? If not, try that and see what happens.
 
I am sure there is one addon for this. Just search and it is most viewed thread.

This looks like a dumb question. But how you post a new thread here. I am missing the new thread option. Am i blind or what?
 
I am sure there is one addon for this. Just search and it is most viewed thread.

This looks like a dumb question. But how you post a new thread here. I am missing the new thread option. Am i blind or what?

It says, "new thread" above the threads. It looks like the "Post reply" at the top of this thread.
 
Open up a text editor, like notepad.

Paste this into it:

Code:
<?php

header('Location: affiliatelinkhere');

?>

Replace affiliatelinkhere with your affiliate link. (should have been obvious but I take nothing for granted.)

Save it as whatever you want the page to be named. Ie.; ilikemyaffiliatelinks (no spaces!)

FTP the file to your server and rename the extension to .php If you have that /health folder on your server and want it to be there, put it there.

Make your links as follows...

http://www.myblog.com/health/ilikemyaffiliatelinks.php

TA-DA!
 
Do you have a folder named "health" with an index.html or index.php file in it? If not, try that and see what happens.

That did it. Thank you.

By the way , if i remember correctly it is in download section.

All the best

This is my first blog so I didn't think something this easy would have a plugin for it. I'll look in downloads for it.
 
Open up a text editor, like notepad.

Paste this into it:

Code:
<?php
 
header('Location: affiliatelinkhere');
 
?>

Replace affiliatelinkhere with your affiliate link. (should have been obvious but I take nothing for granted.)

Save it as whatever you want the page to be named. Ie.; ilikemyaffiliatelinks (no spaces!)

FTP the file to your server and rename the extension to .php If you have that /health folder on your server and want it to be there, put it there.

Make your links as follows...

http://www.myblog.com/health/ilikemyaffiliatelinks.php

TA-DA!

So the only difference is this will allow you to skip the step of creating the redirect in cpanel. Correct?
 
So the only difference is this will allow you to skip the step of creating the redirect in cpanel. Correct?

Correct. In fact, take out that redirect that you created in cPanel.

This merely adds a page to your site... albeit, an invisible page... that serves to cloak and redirect your affiliate link. You link to it, it redirects to your affiliate offer while inserting your affiliate link.
 
USe simple redirect plugin if you want to redirect page.
 
Back
Top