Website to 301, the processing of 404 mistakes

Core clew: Say I visit wrong processing, more saying explicitly is 301 mistakes are mixed 404 mistakes.

Because the website will answered the ground to change a space a few times back and forth, and the change that visit kind also produces, before is use link. The link that brings about search to all alone engine points to a website finally so appeared problem, some pages cannot be visited. If search engine for many times,visit website gets wrong word meets those who affect a website to collect degree. Although be individual rich guest, do not seek visit amount, but everyday a bit taller it is a bit better to click a quantity to always compare unmanned make inquires, and nurturance good, correct use habit also is not an evildoing affection. This is the processing that says I visit a mistake, more saying explicitly is 301 mistakes are mixed 404 mistakes.

1, 301 mistakes

301 mistakes basically are a domain name after changing, search engine still is using original domain name to visit your website, if get is a 301 mistakes, so search engine knows you had changed domain name, can use new domain name to index next time your website, of course what is the new domain name that you should tell search engine you. Code is as follows:

Program code

Of course this is to be written inside a specific file, if you think all requests that visit old domain name turn to new domain name, you install the content of this 301 mistakes in the Control Panel of your fictitious space with respect to need.

To PHP, want to be opposite simple:

If I want to let all coming that visit the data of Duxinhua.cn to be able to jump automatically turn to Dudo.org

If Duxinhua.cn/default.php can turn to Dudo.org/default.php

Change dimensional hind to jump automatically the code that turns to new page

Save the code below for.htaccess

Program code

RewriteEngine On

RewriteCond %{http_host} ^duxinhua.cn

RewriteRule ^(. *)$ /$1 [R=301, l]

RewriteCond %{http_host} ^

RewriteRule ^(. *)$ /$1 [R=301, l]

2, 404 mistakes

If somebody visited a nonexistent page to be able to be returned so,give a browser a 404 mistakes, if we if the discharge of this part also does not want to lose, you yourself can make a 404 wrong pages, the browser lets jump how after a few seconds it is OK to turn to the website to appoint a page. For instance you are visited / Default.asp Ixixi.asp this file is nonexistent, so the page that you can see a 404 mistakes, the you return a website automatically home page after 3 seconds.

The wrong and custom-built function in the Control Panel that the setting of 404 mistakes also is fictitious space, the space that believes the majority is support. And of PHP just also be in. It is OK that.htaccess is revised

Program code

ErrorDocument 404 /Lame_excuses/not_found.html

A good website always should follow certain regulation, and should allow an user gain best experience. It is the website that visitting you immediately occurrence mistake when the user that also does not allow you, even if be a search,engine is faced with a frosty page. Of course we should do still not merely these, it is temporary myself did these only just, be willing to continue to discuss with everybody.