Error
  • The most recent request was denied because it contained an invalid security token. Please refresh the page and try again.

Thu

12

Nov

2009

A Preview of Link Redirection in Joomla 1.6

Joomla 1.6 will include a new component and plugin called Redirect.  Its main function is to provide a mechanism to record 404 "not found" errors, and to give the Web site owner the ability to redirect those to another page if desired.

The Redirect component and plugin is very important in Joomla 1.6 because, at the very least, the new category system will create some new URL's.  Some Joomla 1.5-style URL's will no longer be applicable in Joomla 1.6.  However, Joomla 1.6's new capabilities may also lead you to experiment with new site structure that was not achievable in Joomla 1.5.  Whatever the case, Redirect has been provided to give you the best chance of preserving your search engine page rank (amongst other things).

In the Joomla Administrator some of you may have noticed the Redirect component in the alpha versions that have been released.  Its partner in crime is the System Redirect plugin.  This is currently turned off by default (because Redirect can collect a lot of information over time).  To enable the Redirect plugin, select Extensions -> Plugin Manager from the Administrator menubar, then filter on the "system" type.  Enable the plugin in the normal way.

Screenshot

Now you are ready to start trying to break your Joomla site.  Go to the frontend of the site and put in some incorrect URL's, or find a real article in the sample number and then deliberately put in the wrong article ID.  Your aim is to generate a typical Joomla red-screen-of-death like in the following screenshot.

Screenshot

Since the Redirect System Plugin is enabled, it will record the fact that this page threw a 404 not found error and will await your orders on how to handle it.  Return to the Administrator and select Components -> Redirect from the menubar.  Your page should be similar to the following screenshot, with a list of links collected from the error pages.

Screenshot

You can see what the URL was that threw the error and the time that it was created.  You'll also see the New URL is blank.  We can quickly fix up a redirect on several pages by using the quick update form at the bottom of the page (not, you won't see that form if you don't have any error pages collected).  As shown in the following screenshot, we've selected some of the error pages and entered the new destination page as well as an informative comment about what we are doing.

Screenshot

When you click the "Update Links" button, the list will return as shown in the following screenshot.

Screenshot

You can see the New URL fields are now populated and that the links are enabled.  If you try those pages on the frontend again, you should be redirected to the new URL that you entered.

Of course, you don't have to wait until people have hit stale links before you can put them into the system.  Click "Add" in the toolbar and you will be able to add in a redirection manually as shown in the following screenshot.

Screenshot

Save the link and you are away (to another page as it were).

This is a really neat inclusion for Joomla and one that I think will be enjoyed by most site administrators.

If you'd like to discuss this new feature, please join in the Joomla Alpha 2 discussion on the forum.  If you are wanting to see this feature in action (and are feeling a little bit lucky), you can download and test the nightly build of Joomla 1.6 (allow a day or so for recent work and bug fixes to come through).

Please keep in mind that we are still in an Alpha stage and many things are either broken or not working as planned - but we are getting there.


Andrew Eddie is a co-founder of the Joomla Open Source project and is highly active in the version 1.6 development process.  He currently operates a Joomla-based development and training consultancy New Life in IT, blogs regularly at the Art of Joomla and produces high-quality commercial Joomla extensions through his company JXtended.

46 Votes

17 Comments

Feed
  1. Does this mean that you also in a preventive way can set up Joomla standard so that every 404 error can be directed directly to the main page before hand? Not have to deal with individual pages just set up it like a standard redirect with error message pop up or something?

    How do you set up this manually ?
  2. WoW, this is smashing, just tried it on my local test messup installation ...

    Keep this good stuff comming folks, this is amazing
    Cheers :-)
  3. Nice stuff! Keep up the good work, fellas!!
  4. Looking good!

    @Robert Duke

    Doing a redirect from all 404's to the main page is a big SEO no-no. Google will not like that. If a page is moved (new URL), use a redirect, if a page is REmoved, use a 404.
  5. Nice, should we use another component to change the way of the error message ?:-)
  6. oh yes!. This is it><img src=" />
  7. WOW...
    Just Wondering.. When this brilliant Verizon be real?
  8. Great article and functionality! Will be very helpful :)

    Robert - that's not a good solution. You should always use a 404 page if the page is not found. Redirecting to the front page is not good. Google indexes pages based on links. Imagine a person linking to your domain with this URL:
    www.veryfineproducts.com/yeahrighttheys**k/
    This URL can be indexed by Google and show your front page ;)
    Not very nice, right?
  9. A great feature, but one critical piece thing is missing, recording the number of hits that the 404 has.

    404's can be logged by people simply mis-typing URL's. A counter is needed to identify what 404's are major issues and need to be redirected.

    Without this count, the 404 redirect function won't be usable.
  10. Awesome!!

    I can't wait till its released, but I am having a feeling that upgrading will not be straight forward as upgrading to any version of 1.5.

    ..its the citrocity.

    ;-)
  11. Mama mia

    Very useful feature .Thank you very much

    Keep up the good work .We will soon be the best CMS in the whole universe !
  12. Hello Andrew

    for unicodes languages how?

    eg: persian,arabic

    same : http://yourdomain.com/جومفا

    this is ok?

    infograf designed one plugin for this problem :

    http://extensions.joomla.org/extensions/site-management/sef/10275

    Thanks
  13. It's great to see that this functionality is now built in to Joomla!. Up until now we had to use one of the many SEF and redirection solutions, but none was as simple and straight-forward as the one you give us on Joomla! 1.6. Thank you!
  14. Yes thank that is very important
  15. Great Feature and great article, Joomla 1.6 will definitely minimize the use of 3PD component but I wonder how does it impact on the database load and execution time of the website?
  16. Really needed feature in Joomla, waiting for the next great release.
    When is 1.6 going to be available? any hints...
  17. Even better if it can also be used to implement the correct 301 redirects for static pre-Joomla sites that are co-present.

Add Comment


    • >:o
    • :-[
    • :'(
    • :-(
    • :-D
    • :-*
    • :-)
    • :P
    • :\
    • 8-)
    • ;-)