Dynamic404 works flawlessly together with the Joomla! core as well as popular extensions like ZOO and K2. With VirtueMart however, there are various difficulties when trying to fetch 404-errors and making them useful for your visitors. The architecture of VirtueMart is outdated, but it's still possible to make use of Dynamic404. This tutorial describes a core hack in the code of VirtueMart to modify the 404-behaviour of VirtueMart.
To show the usage of Dynamic404, let's assume that we have an old URL http://JOOMLA/old.html which has been renamed to the URL http://JOOMLA/new.html. Because of this, the old URL old.html throws a 404-error which we want to redirect to the new URL.
Dynamic404 makes use of a System Plugin to override the normal behaviour of Joomla! error-handling. This means that you will no longer use the error.php file located in the template, but use Dynamic404s built-in mechanism instead. This guide shows you how to change this Dynamic404 behaviour, and use both your own error.php file as well as the Dynamic404 logic.
Joomla! uses two types of URLs: Non-SEF URLs (also called System URLs) and SEF-URLs (Search Engine Optimized URLs). Since System URLs make extensive use of numeric IDs, there's no logical guessing to be done here. Dynamic404 will there for only work with SEF enabled.