I want to redirect to a custom error page whenever a user reaches not available page. I know about Custom error settings of WebConfig file but if i am not wrong that will redirect all the broken links of the web application, which i dont want as there are other site collections also under the web application.
Also i want record somewhere the url of the page from which it has redirected.
Can somone suggest what will be the best approach for this.