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.

77 Votes

26 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.
  18. Possible income model:

    Corporations X, Y and Z want to have certain very specific and advanced features (e.g.: multisite) added to Joomla. They are not concerned about generating income through distribution (sale) of the extension; they just want the feature to implement it in their business model. Corporations X, Y and Z know that each of them (independently) will have to invest thousands of dollars to hire/contract a developer to build the extension. In this economic environment they realize there is no good Return of Investment for starting the project, so they don't do anything.

    OSM opens a partnership program, in which Corporations X, Y and Z (each) can donate $1,000 (for example) and become gold partners. As gold partners OSM guarantees that reasonable requests for extensions by the gold partners will have priority in the development process. That way: OSM generates income, we can have professional staff / developers, Corporations X, Y and Z get to show off as gold partners of an Open Source Project; and all the Community get a good framework with awesome extensions out-of-the-box. What do you think?

    By the way: I agree 110% that Andrew and Louis should get compensated for their time and (specially) investment of talent on Joomla.
  19. Useful feature but counter for error pages is necessity.
  20. 404 Error counter is necessary. Pls include this in your plan.
  21. how i could i edit or change the redirect page manually and where could i find the source codes(what folder should i look for)?im new to joomla,please help me
  22. URRRRR upgrade again. WHat happens to my versuon 1.15.5 will this be a simple upgrade over that version? :'(
  23. Hi,
    the Redirect system looks great. What I would like to do is to implement a Personalized URL [PURL] system and the redirect module looks like a great place to start. Would it be possible to have a hook implemented that invoked and external module that checked if the URL was part of a "PURL" system before throwing it to 404? Combining this with a newsletter system like AcyMailing and some additional autoresponder functionality would make Joomla into an outstanding e-marketing platform...
    Any hope for this?
    /Lars
  24. Hi there,
    404 page not found makes sense.

    However, is there a way where joomla cannot connect to the SQL server for X number or seconds or minutes and instead of showing an error

    "Cannot connect to MySQL...", it redirects to a maintenance page or something similar?

    Regards,
    Sammy Lamba
  25. nice work, very useful . thanks
  26. Very good addition, but not exactly what's needed from a SEO perspective e.g. when "refactoring" the site menu while keeping the content.
    AFAIK, to "keep" your search engine weight for a specific content when changing the location, you are strongly advised to use a native http 301 redirect ("permanent redirect"), not "back to the home page via 404" or something like that.
    Should be easy to add...

Add Comment


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