Hi I'm trying to use this bit of code that I found in a few places to redirect the page to a 404.html page...
Response.Status ="404 Not Found"
Response.AddHea der "Location","htt p://sitename/404.html"
It doesn't seem to work but just returns an error. As far as the header is concerned it gives us exactly what we want but just doesn't do the redirect...
Using the same bit of code but with a 301 Permanently Moved does do the redirect but doesn't give us the proper header...
Response.Status ="301 Permanently Moved"
Response.AddHea der "Location","htt p://sitename/404.html"
If I use the response.redire ct method anywhere in the page the Status becomes a 302 automatically, hence the reason we are trying to use this code in the top example...
Can anyone help with this?
Response.Status ="404 Not Found"
Response.AddHea der "Location","htt p://sitename/404.html"
It doesn't seem to work but just returns an error. As far as the header is concerned it gives us exactly what we want but just doesn't do the redirect...
Using the same bit of code but with a 301 Permanently Moved does do the redirect but doesn't give us the proper header...
Response.Status ="301 Permanently Moved"
Response.AddHea der "Location","htt p://sitename/404.html"
If I use the response.redire ct method anywhere in the page the Status becomes a 302 automatically, hence the reason we are trying to use this code in the top example...
Can anyone help with this?