I have set a 404.asp page on my iis 7 yesterday and on this page beside some chacking i had at the end if anything was false i had:
response.status "404 Not Found" response.AddHeader "location", domain & "/notfound"
it worked for an hour and then stoped working. on webs that checks the header status i get 404 not found and the addheader is there but no redirection is actualy happaning
what can i do to fix that?
Answer
I assume that “domain” is defined previously in the script?
Any chance that you set this using IIS Manager and then did a code push which overwrote your web.config file? If it worked for an hour, it seems like something was working at one point and that it’s a later change that caused it to break.
Attribution
Source : Link , Question Author : Y.G.J , Answer Author : Scott Forsyth – MVP