It's Friday - what a day to visit jfoobar!

Jfoobar Labs

At jfoobar labs you will find "stuff" that is either cool, useful or for learning purposes. We hope to create a pretty nice selection over time. Remember, we need it to be fun.

Plugin - Redirect

  • Name: jfoobar_redirect
  • Type: System Plugin
  • Compatible: Joomla! 1.5+
  • Last update: 2009-01-10
  • Copyright: jfoobar
  • License: GPL 2.0

With this Joomla! 1.5+ plugin your installation can understand different URL's. For example we could use http://jfoobar.org/tiny-147 as a valid URL. The plug-in then redirects to the corresponding article. This logic is used in social environments like twitter. This plug-in is used on the JFoobar twitter page.

The plugin does not intervene with any existing plugin that does SEF or URL replacement. All it does is send a redirect to the browser when an article is found, so all existing URL's will remain untouched

Please read the detailed instructions before you start using the plug-in.

To use this plugin you of course first need to install and activate it in the extension manager. Also make sure you have the rewrite engine running (Apache mod_rewrite) and SEF enabled in the Joomla! main configuration, else the plugin won't work! See the example of the required settings below.

Example of SEO settings for this plugin

The plugin is defaulted on tiny URL's. If you want other URL's to be redirected, you should alter the properties of this plugin in the plugin manager.

Overview of redirect plugin parameters

The url prefix is a regular expression. Please keep in mind that the regular expression should always be made out of two results, and the second result field needs to be the article id. '/tiny-(.*)/' redirects "/tiny-999" alike URL's and '/node\/(.*)/' redirects "/node/999" alike URL's.

There are 13 comments posted.

Re: How does it work, Example

# 1 - Posted by: James Lawson-Smith on 2009-01-29 11:42:48

Could you give a few examples like

boofly.com/tiny-741 would point at http://boofly.com/component/option,com_idoblog/Itemid,7/id,41/task,viewpost/

I can not get it to work. Have published and turned on SEO urls but still nothing.

# 2 - Posted by: Wilco Jansen on 2009-01-29 12:02:56

Looks like you are using Joomla! 1.0...this plugin only works on Joomla! 1.5, and it also works only for com_content and not any other component like you seem to be using.

# 3 - Posted by: Gergő Erdősi on 2009-03-21 22:19:24

I spent an hour writing a tiny URL handler script for Joomla! when found this plugin. I needed exactly this one! Thanks for this great plugin!

Re: Can't seem to get it to work

# 4 - Posted by: Bridgette on 2009-03-27 17:57:18

Hi, I've installed the plugin and it's enabled. Also, I've set the sef global config settings to On. I'm using sh404sef. Everytime I try to type in a tiny url like http://www.libertybaptistchurch.ws/tiny-12 I get my 404 page. Can you take a look and see what I'm doing wrong? Also is there a way to give visitors a button on the article or something so that they have access to the tiny url for sharing in social networks?

Thank You. This plugin is exactly what I need if I can get it to work!

Re: Update to comment #4

# 5 - Posted by: Bridgette on 2009-03-27 18:09:14

I've done some more testing and it seems to be a conflict with sh404sef. When I disabled sh404sef the redirects to /tiny-# worked.

# 6 - Posted by: Wilco Jansen on 2009-03-27 21:58:06

Try changing the order of the plugin, make sure the tiny url plugin is in front of any sf404 plugins. Most likely that will solve your issue.

Re: Link tracking

# 7 - Posted by: Michaek on 2009-04-15 04:38:57

I think this is a great plugin, but I'd like to be able to track the number of times the link is used. For example, I want to put them into newsletters and find out how effective the newsletter is at drawing people to my site.

Re: Blogged about this

# 8 - Posted by: Accorciare le URL di un sito Joomla con JFoobar Redirect Plugin on 2009-04-28 10:36:17

[...]Il plugin JFoobar redirect è stato pensato proprio per questo e permette ai siti realizzati in Joomla di riconoscere e reindirizzare diversi tipi di URL brevi.

Per esempio, potrete usare http://ilvostrosito.com/tiny-147 come URL valido.[...]

Re: Only content???!!

# 9 - Posted by: MrRoyce on 2009-06-09 01:09:41

Hi there, this is a great plugin, however... can it be extended to any J! page? I'm afraid to show this to my boss (who was asking about tiny urls today) because he is going to want it to point to different pages on our site ;-)

Re: Very fine

# 10 - Posted by: Polizei on 2009-07-29 15:07:01

Very fine plugin! Probably we will use it for our website for german Polizei...

# 11 - Posted by: sanya32 on 2009-08-18 08:43:32

Yes, good plugin and usefull.

Re: Not working

# 12 - Posted by: Mark Collins on 2009-09-09 05:45:11

I have the apache rewrite mod on.

The plugin is as high as it will go in the order. I don't have that plugin they mentioned above...

what gives?

# 13 - Posted by: Wilco Jansen on 2009-09-09 06:38:05

Do you have SEF working? If so, make sure the plugin is installed and published, follow the instructions for configuring (plugin properties) and it should work like a charm.

Help for creating beautiful comments.

Enter Your Details:
Enter Your Comments:
I'm finished with the form Your form will be checked and you'll get a preview.
moovur promo

JFoobar friends on Twitter

Follow JFoobar on twitter

Sponsored Links

Latest Comments

Aaron wrote:
2009-12-23 13:19:22 - Genius! Thanks, Wilco. I've been dying to take .
Posted in How to downlo .
Amy Stephen wrote:
2009-12-22 18:39:37 - Happy Birthday to one of Joomla!'s most noble - .
Posted in Mister Joomla .
Antonie de Wilde wrote:
2009-12-22 09:30:26 - Congrats Robin. Have a good day and watch out w .
Posted in Mister Joomla .
Robert wrote:
2009-12-22 08:51:02 - Happy Birthday Robin .
Posted in Mister Joomla .
Arno wrote:
2009-12-22 08:43:28 - Happy Birthday Robin, love your suit, you wife .
Posted in Mister Joomla .
Brian Teeman wrote:
2009-12-22 00:17:41 - Happy Birthday Robin, Welcome to the big four oh .
Posted in Mister Joomla .