1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom error pages and MVC

Custom error pages and MVC

1 posts, 0 answered
  1. Dave
    Dave avatar
    29 posts
    Registered:
    31 Oct 2011
    17 Oct 2012
    Link to this post
    I have two sites - a SF install, and a big old PITA MVC/classic ASP site.

    I want to have requests cascade between the two applications, like so:

    User requests http://www2.mysite.com/chicken - where www2.mysite.com is the SF site.
    If "chicken" is a valid URL within SF, SF should respond to it and continue on its way.
    If "chicken" is NOT a valid SF url, the request should be handled by the old site.

    The simplest way I've come up with is to have a custom 404 page in SF which will rewrite to the old site. So, if SF returns a 404, the request gets processed by the old site. In this way any pages added to SF will take precedence over anything in the old site that would have the same url. (Content managers can then just add a new page to SF to replace an old page, and not have to get me involved to add redirects, etc.)

    Another idea is to have a 404 page rewrite to, say, /fetch/(original url) and have my rewrite engine (Helicon ISAPI Rewrite) rewrite *that* to the original site using its reverse proxy function. This works, but I'm wondering if there is a lest convoluted way to approach this.

    Any suggestions on how to do this? If possible I'd like the 404 page to be in MVC / Razor.
1 posts, 0 answered