CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
301 Moved Permanently
- Article ID:
175 - Date Created
Friday, July 13, 2012 - Last Updated
Friday, July 13, 2012 - This Article Has been Viewed
1528 times - Short Desc
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. - Details
When your site has what is called: Dead link 301 Errors.
This is not good for a webmaster to have, so what we do is create a 301 Moved Permanently script, that allows the search engine spiders to come in, and see that the page has been moved, and then to remove the link from it's 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 this issue:
To recreate a page not being found, you need to remove it from your web server, once it is removed, click on the link to that page, and it will give you an error. - Resolve Issue
To resolve this issue:
This issue is very easy to resolve in ASP Classic.
Place the following code in the <head> of your page, and run it.<%
' The src gets the Script_Name?QueryString
scr = Request.ServerVariables("SCRIPT_NAME")&"?"&Request.ServerVariables("QUERY_STRING")
if scr="main.asp?Oldid=3" then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "main.asp?id=3"
Response.redirect "main.asp?id=3"
end if
%>
Alternative, to the above, which only works if you are dealing with QueryString.
If you are dealing with plain pages, then you will just a single page, then you will do something like this.<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "NewPage.asp"
Response.redirect "NewPage.asp"
%>
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16826