When you change your pages around, you do not want to leave a lot of dead links, this will cause you to have negative hits on your site, called 301 errors.
Issue Details
When your site has what is called: Dead link 301 Errors
Copy
Search Site
Search Google
.
This error is not good for a webmaster to have, so what we do is create a 301 Moved Permanently
Copy
Search Site
Search Google
script that allows the search engine spiders to come in, see that the page has been moved, and then remove the link from its database and replace it with a working link that we provide in code.
The page you requested is NOT AVAILABLE A general error has occurred
Recreate Issue
To recreate a page that is not found, you need to remove it from your web server. Once it is removed, click the link to that page, and you will get an error.
' The src gets the Script_Name?QueryString
scr = Request.ServerVariables("SCRIPT_NAME")&"?"&Request.ServerVariables("QUERY_STRING")
if scr="main.asp?Oldid=3"thenResponse.Status="301 Moved Permanently"Response.AddHeader"Location", "main.asp?id=3"Response.redirect"main.asp?id=3"end if
Alternatively, the above only works if you are dealing with a QueryString
Copy
Search Site
Search Google
.
Add this to the header of your page. (If you are not using dynamic pages, then you will have to add this to the top of every individual page)