GoCodes Redirection Plugin 1.0
Wednesday, February 6th, 2008 by MattIntroducing my latest Wordpress plugin: GoCodes, the redirection plugin for Wordpress.
Have you ever had to give someone a shortened version of a URL? Maybe you’re a podcaster, and you need to say “visit mydomain.com/2008/01/03/my-post-with-a-long-url/ for more info.” Wouldn’t it be useful if you could just say “go to mydomain.com/go/mycoolpost/ ?” Sure, you could use a service like tinyurl.com, but that’s still not too great if you need the URL for a podcast. It’s still awkward to read-out “tinyurl.com/27asr9,” isn’t it? It’s less professional too. GoCodes let’s you create shortcut URLs to anywhere on the internet, right from your Wordpress Admin. Whether you need it for podcasting, printed publications, or affiliate programs, GoCodes will do the job for you.
You can read more and download the plugin here.










2:17 pm on February 23rd, 2008
Is there a way to change the /go/ to something else or even hav the feature to have more than just the /go/ for different things? (Email me if you have to.)
Thanks
Mark
4:51 pm on February 23rd, 2008
It is possible to change the /go/ to something else. In the lines of code you add to your .htaccess file there is a spot,
, where you can replace the word “go.”RewriteRule ^go/([A-Za-z0-9]+)
It is also possible to have multiples. By duplicating the line, and changing the “go,” you can have
RewriteRule ^go/([A-Za-z0-9]+)/?$ /index.php?gocode=$1 [L,R]
RewriteRule ^jump/([A-Za-z0-9]+)/?$ /index.php?gocode=$1 [L,R]
If you do that, then yourdomain.com/go/mypost1/ and yourdomain.com/jump/mypost1/ would point to the same place.
9:36 pm on February 29th, 2008
Hi matt, great site you run here, and a great plugin too.
I have installed and set your plugins, but can’t redirect it properly.
To test your plugin, I have to added this “recommend” Key to redirect to http://www.jawapos.com.
So if i type “www.henbima.com/go/recommend” it suppose to redirect to http://www.jawapos.com right? insead i got “http://www.henbima.com/?gocode=Recommend”, which point back to my site.
Would you care to point out what i might miss here?
thanks Matt!
11:18 pm on February 29th, 2008
Henbima, this issue seems to affect more than just you. I’m currently working with an other blogger who has the same problem. Once it is resolved, I will email you with the solution.
12:21 am on March 1st, 2008
Great matt!! Will be waiting for your solution.
Btw, just FYI i found another plugin also function like your here, called “hidden affiliate links”. But theirs a bit complicated, that’s why i prefer using yours.
4:03 pm on March 1st, 2008
Glad you prefer my plugin.
I just uploaded GoCodes 1.1.1 to the WordPress Plugins Directory. I fixed a couple of bugs that seemed to be stopping the redirect on some servers. Just upload the new gocodes.php to your plugins folder and it should work correctly.
http://wordpress.org/extend/plugins/gocodes/
4:29 am on March 2nd, 2008
thanks Matt! it work great now.
I have just made a review about your plugin on my blog, as my thank you
5:57 am on March 2nd, 2008
[...] you find any problem whatsoever with the plugin, you can contact Matt the gocodes creator. As he put concern on his free product. I face some problem two days ago, and it’s fixed [...]
12:35 pm on March 2nd, 2008
Thanks for the review of GoCodes, Henbima.
9:14 pm on March 15th, 2008
Hi! And thanks for a great plugin. However, I can’t get mine to work. Oh no!
I installed as directed but landed in trouble when trying to add the code to the .htaccess file. I can’t find where it says: # BEGIN WordPress”.
Please help!!
Many thanks,
HypnoGirl
9:30 pm on March 15th, 2008
@HypnoGirl: You seem to be using the “semi-pretty permalinks.” The plugin isn’t entirely compatible with them. If you email a copy of your .htaccess file to me (see About/Contact page), I may be able to provide further assistance.
9:49 pm on March 15th, 2008
Wow, how wonderful! Thank you Matt. Sending to you now!!!
8:13 pm on March 19th, 2008
Hi Matt, thanks for the plugin. This is the exactly plugin that I am looking for. I like it. Perhaps, I missed some here. Could you help me to verify?
First, I have uploaded gocode.php into /plugin directory and activated it (version 1.1.1)
Second, I have uploaded .htaccess file in root with following entries.
RewriteEngine On
RewriteRule ^go/([A-Za-z0-9]+)/?$ /index.php?gocode=$1 [L,R]
Third, I have created a keyword named “test” and point to wordpress.org.
Fourth, I opened a browser and hit http://www.mydomain.com/go/test, it failed to redirect. It gave me page not found result (404)
Anything that I missed?
Thanks Matt.
11:48 am on March 20th, 2008
@Sugeng A few other people have asked me about this, and I haven’t been able to find out what’s wrong. I think it has to do with the .htaccess somehow, but it only happens on some servers. I’ll ask about this on WordPress.org, and a few other forums if necessary, and let you know what I find out (I’ll send an email). But I have one question first:
What URL to you end-up on when the 404 error comes-up? Is it yourdomain.com/index.php?gocode=test ?
12:46 pm on March 20th, 2008
Hi Matt,
Thanks for your prompt reply. I have a good news for you.
The redirection is working now and I have done nothing to it. I use shared hosting so I have no idea why it can work now. Perhaps, there is a background processing that I am not aware of.
Please let me know if you know the answer. I am keen to know the reason of it.
Thanks again Matt, great work.
If you open for my suggestion, there are 2 features that I missed.
First is the “edit” feature. At this moment, I have to delete and recreate the link if I want to modify the link.
Second, “reset counter” also a nice to have feature to reset the hit counter.
Cheers
1:00 pm on March 20th, 2008
Thanks for your feature suggestions. I will consider implementing them in a future release.
I wonder why it started working all of a sudden like that… I will go ahead and post a query on the WordPress forum. I’ll let you know If I find anything out.
12:53 am on April 8th, 2008
Matt, Is there a way to put a dash between keywords, such as /go/make-money so its not /go/makemoney , I would like to be able to have dashes between my keywords if possible. Thanks in advance for the answer.Jason
8:53 am on April 8th, 2008
Curently, there is no support for dashes, any non alphanumeric characters. I can work on an update though. It may take a few days, but I’ll see what I can do.
It was just so much easier to only support alphanumeric at first.
4:04 pm on May 6th, 2008
Glad you created this plugin - Thank You! I did write a review about it, but since it is in Polish I don’t think it will be of any use to you ;)Keep up the good work
5:05 pm on August 4th, 2008
If you use this plugin for redirecting and hiding affiliate links, does this method retain the cookies needed for the affiliate to track?
5:38 pm on August 4th, 2008
@Susa, Yes it does.
One of the reasons I made GoCodes was for affiliate URLs.
5:51 pm on August 4th, 2008
Thanks Matt - I got a question regarding special handling of CJ affiliate links.See below (I also included the referenced url). I tried adding “&afsrc=1″ but the plugin omits the “&” when saved. is there a way to keep it included if this ‘&afsrc” set is needed for CJ? I’ve heard it’s also needed for BeFree and Performics when ‘hiding links’.————————————————–http://www.cj.com/code_of_conduct.html Publisher Link - an affiliate service
provider’s URL that is used to track end-user referrals from the
publisher Web site to the advertiser’s Web site, via the service
provider’s Web site or that contains a parameter named ‘afsrc’ set to
any value.
e.g. http://www.mysite.com/redirect.....mp;afsrc=1
This ‘afsrc’ parameter option is provided to address the case where
affiliates modify or mask the links provided to them from the service
provider such that it is impossible to determine that they are
affiliate links solely based on the URL’s appearance. Publishers are
encouraged to contact technology providers for an updated list of
tracking domains.
12:06 pm on August 5th, 2008
@Susan, That’s odd. I don’t think I’ve seen anyone have that issue before… I can have &s in my URLs fine. Could you post a few screenshots (just host it somewhere like ImageShack.us or TinyPic.com and post a link here)? I’d like to see the affiliate URL starting out, how you have the form filled, and the final listing on the GoCodes management page. It would help toubleshooting a lot if I had a visual representation. (If you’re not comfortable posting screen caps here, you can send me an email at matt at [this domain]).
4:19 pm on August 23rd, 2008
Matt, I’ve installed the plugin (vers 1.2.2) in Wordpress 2.6 and added the redirect lines to .htaccess, but when I try to add a link in the plugin window I get the error: “cannot load gocodes.php” Any ideas? gocodes.php is in the plugin directory with 644 permissions. Thanks, Mark
10:55 pm on August 23rd, 2008
Forget that issue - I found I had the gocodes.php in the plugins directory, but all by itself - not in the gocodes folder. Works now.
5:19 pm on August 31st, 2008
Hi! Great plugin. Works well. My only question is: is there a way to make the URL bar show “[my website]/go/[link name]” instead of the link once it redirects? Thank you,-Erica
8:22 pm on August 31st, 2008
@Ericabiz, no it can’t do that. Something like that would require the use of frames, of which there is no support for, and the use of which I generally disapprove of. Sorry. I hope this isn’t a major deal-breaker for you.