asp.net mvc 4 - Getting routes to handle static content types that produce 404s -


i have mvc site replacing old website. want able handle requests old static html files redirect 404 error handler on mvc site - i'd provide 301 code instead of 404 let crawlers know content has moved

at moment when try , navigate static content iis 404 error. can use custom error handling handle missing file i'm not sure way working

<httperrors errormode="custom">   <remove statuscode="404"/>   <error statuscode="404" path="http://localhost/site/error/notfound" responsemode="redirect"/> </httperrors>  

is there better way or way else doing it? how provide 301 instead of 404 since it's static file handler that's serving content?

is there way mvc handle requests file extensions , catch 404s these if don't exist?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -