Forum Moderators: open
i have the script for my ASP pages to redirect propertly via "301 moved permanently", but what about HTML pages....
i dont want to use the META REFRESH because i heard SE's dont like them...is there another method for HTML pages...
Return a 410-Gone for intentionally-removed resources for which there is no relevant replacement. The 410-Gone error page should contain an explanation of how the user got there, and a link to your site map or home page.
If a URL does have a replacement, then a 301-Moved Permanently redirect from the old URL to the new URL is the best practice.
Return a 404-Not Found only if the page is missing as the result of a server error, a script error, a Webmaster error, or a user error (e.g. mistyping the URL in the browser address bar). The 404-Not Found error page should contain an explanation of how the user got there, and a link to your site map or home page.
Ref: HTTP/1.1 Status Code Definitions [w3.org] (Server response codes)
However, the overall "best practice" is to never change your URLs. Forethought when designing the URL-architecture of a site can prevent the need to ever change or remove a URL. Because URLs and filenames are different names for the same resource (in the Web and server filesystem name-spaces respectively), they need have no relationship to each other; You can easily move or rename a file on the server without changing the URL by using Apache mod_rewrite or ISAPI Rewrite on IIS. From one of the two inventors of the Web, Tim Berners-Lee: Cool URLs don't change [w3.org].
Jim
[edited by: jdMorgan at 2:54 pm (utc) on Oct. 13, 2006]