Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

WordPress MultiSite Link Cloak & Redirection? WordPress

  • SOLVED

I have many blogs on a WordPress MultiSite install. These use the subdomain method and are mapped into MultiSite, so they run off their own URLs.

- siteA.com
- siteB.com
- siteC.com

They're all affiliate sites using the same affiliate products, and therefore the same affiliate links. I currently use the [[LINK href="http://wordpress.org/extend/plugins/redirection/"]]Redirection plugin[[/LINK]] but this means manually setting the links & cloaks in WP Admin for <em>every blog</em>. And if I want to change the link, I have to do it manually in WP Admin for <em>every blog</em>.

This sucks and I need a way to set the links once, and all blogs who reference the relative link set use the cloak & redirect, like so .....

<em>Cloak Address</em>
siteA.com/out/product1
siteB.com/out/product1
siteC.com/out/product1

Therefore any blog with the relative link /out/product1 will redirect to the preset affiliate link.
www.long-ugly-affiliate-link-for-product-1.com

I tweeted the always-helpful [[LINK href="http://twitter.com/andrea_r"]]@andrea_r[[/LINK]] who replied about hard-coding the Redirections plugin into mu-plugins. But that is a beyond my skill-set. Can anyone do this, or have any other suggestions? The [[LINK href="http://wordpress.org/extend/plugins/redirection/"]]Redirection plugin[[/LINK]] is not a one-file plugin; I had a quick look and there are many files and many folders.

I am open to any ideas that work.
The simpler the better.
Link tracker and/or hits are not required.


* Please note *
I am in Australia, so my timezones might be polar opposite to you. I will be offline between midnight and 8am AEST. No need to rush your answers.

Answers (2)

2011-03-30

Denzel Chia answers:

Hi,

I had emailed you a javascript solution.

Please try it out and let me know if this is what you want.

Thanks.
Denzel


TheLoneCuber comments:

I am doing some research on your suggestion Denzel. It looks like it would work for sure, but I'm worried about redirecting via javascript. All I know about Google and their laws are that they are their own laws. I cannot afford to cop any penalties.


Denzel Chia comments:

Hi,

The only solution now is to setup your own url shortener using Yourls
A url shortening service is actually a url redirection service.
You do not need the url to be very short, it can be normal long url too.
I am sure this will not violate any Google rules.

Yourls allows you to use it privately. You can login to it's admin panel and create your own "short" link with a custom url. Please see attached image on the Yourls admin.

So for example, you can have a domain name http://mydomain.com
setup Yourls on it. Login into admin and paste in long affiliate url and type in custom "shorten" url such as http://mydomain.com/out/product1 and create it.

Now for every blog of your multi site installation, no matter 1000 or how many blogs, just use the same link http://mydomain.com/out/product1 will redirect user to affiliate link.
And this will be perfectly Google legal because http://mydomain.com is a url shortener.


Thanks.