I tried by overriding Application_OnError but that does not work. I tried by adding Action Filter (HandleErrorAttribute) OnException but it does not fire on 404.
So what possibilities do I have to catch all 404 errors within a plugin and without modifying nopCommerce code? I want to create a URL redirect plugin.
Also tried overriding PageNotFound of CommonController, but it is not overwriteable.
Did not try overriding InvokeHttp404. This should work, but only for existing routes.
So I tried adding plugin to global.asax Application_Error()-method, but there I can not implement any plugin (or I do not see how it is done).
I want to redirect non-existing routes (URLs of old shop) to new nopCommerce URLs, but I have to lookup the IDs within the old URL and get the productname for the new url out of the database. That can not be done in IIS URL rewrite.