Custom error pages and MVC

Posted by Community Admin on 04-Aug-2018 20:52

Custom error pages and MVC

All Replies

Posted by Community Admin on 17-Oct-2012 00:00

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.

This thread is closed