1

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.

2 Answers 2

1

You could create a custom page not found page that would retrieve the URL of the Site Collection-specific page from for example the property bag of that specific Site Collection and redirect to that page.

2
  • Thanks for replying. Coluld you please elaborate a bit or share some resource. I am finding it difficult to understand.
    – Mohit
    Commented Aug 2, 2013 at 5:35
  • First of all you would create a Page not Found page which would be global and configured on the Web Application Level. When triggered, this page would execute some logic to figure out in the context of which Site Collection it has been executed and then would redirect to the Page not Found of that particular Site Collection. Which page that is would be configured for example in the property bag of the RootWeb. Commented Aug 13, 2013 at 18:55
0

You can achieve this using Http Module. In this you need to check for specific site collection and error if you want, based upon these two you can redirect the user to any page.

1
  • As per my understanding HTTP Modules could lead to Permormance impact on complete Web Application. Could you help me understand how deep the impact could be.
    – Mohit
    Commented Aug 2, 2013 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.