Инструкция по переезду на другой домен
, , , , , , - . , , .
, http://site.ru/ http://www.site.ru/ . , [url]www.example.com[/url], www, . , , , , , , . ( , , , H ).
, , , , . , , .
, .. . [url]www.old-site.com[/url], main-site.com.
, , http:// . , . , , , . , . , .
,
<a href="/page.html">
<a href="http://main-site.com/page.html">.
, . Host robots.txt. , . Host , . Host [url]http://,[/url] main-site.com
, , . , robots.txt c , . :
User-agent: *
Disallow: /dir/page.html
User-agent: Yandex
Disallow: /dir/page.html
Host: main-site.com
, , Disallow, :
User-agent: Yandex
Disallow:
Host: mysite.ru
robots.txt H. , , "".
, , , . , , , , . , .
. , Google. GoogleBot . , , . ?
Google 301 , , 302 . , , , , [url]www.old-site.com/page.html[/url] main-site.com/page.html. , - Apache mod_rewrite. , -.
mod_rewrite .htaccess , . :
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?old-site\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.main-site\.com$
RewriteRule ^(.*)$ http://main-site.com/$1 [R=301,L]
. 1 .
2 , .
3 4 , . , , , www.
5 .
, , , .
. , , , , .
Все статьи
|