Yireo Blog

What we have to tell you
You are here: Home Blog General news Short URLs with Dynamic404

Short URLs with Dynamic404

If a page can not be found in Joomla!, a 404 error is thrown. This shows up by default as a red warning-box declaring something about contacting the administrator, but offering little help in finding the right page. Joomla! 1.5 has improved the old situation by allowing Joomla!TM templates contain their own custom 404-page. But still the whole concept of a static 404 page seems outdated. That's why there is YireoTM Dynamic404.

Understanding Search Engine Friendly URLs

The purpose of Search Engine Friendly (SEF) URLs is to help search engines but also human beings understand (or read) URLs. A webpage about "Warp Engineering" (remember Star Trek?) is served through an URL ending with the key "warp-engineering". The reverse also makes sense: If a visitor types in the URL "warp-engineering", he or she expects to see an article about warp engineering (or at least something geeky about Star Trek). Certainly a 404 page does not help the visitor.

When 404 occurs

Joomla! constructs URLs by using the Article Alias, not the Article Title. Now, if you change the title of the article "Warp Engineering" to "Warp Field Engineering", nothing will happen. The URL will still be the same. But if you also change the Article Alias (or perhaps the alias of the Menu-Item linking this article) from "warp-engineering" to "warp-field-engineering", then the URL will change and the old URL might cause a 404 error to be generated. (Note that this change does not neccessarily cause a 404 error, but that takes a bit more time to explain.) Changing aliases on a live Joomla! site is - simply put - dangerous.

Helping the visitor with Dynamic404

Instead of not changing the URL, the right philosophy would be to redirect the visitor from the old incorrect URL to the new correct URL. Dynamic404 can do this for you. It tries to guess the right URL by looking at the words in the previous URL - in this case "warp-engineering". Next it tries to guess which current page comes the closest. Each possible match gets a certain rating (as in a percentage) and the match with the highest percentage is used to redirect the visitor to (unless you have disabled redirection).

Generating 404s on purpose

Because this principle of Dynamic404 works so wonderful (and easy) it's even possible to generate 404 pages on purpose. Let's say that the full URL to the example article looks like this:

/tv-series/star-trek/technology/warp-engineering

Instead of giving somebody this complete URL - which is too long to remember - you can just use the following:

/warp-engineering

Dynamic404 will just redirect this incorrect URL to the right URL.

More short URLs

Besides just using the same Article Alias for redirection, you can also create manual redirects within the Dynamic404 component in the Joomla! Administrator. This allows you to generate any redirect possible. For instance you could create various redirect rules, which will all redirect to the same article:

  • /warp
  • /warp-field
  • /warp-engineering
  • /warp-field-engineering
  • /warp-field-engineers
This acts the same as so-called short URL services like TinyURL, but now with Joomla!. That's for sure a major improvement to static URLs.
 

Payments Methods

Payment Methods