{"id":1095,"date":"2010-11-27T12:53:36","date_gmt":"2010-11-27T10:53:36","guid":{"rendered":"http:\/\/netspider.com.ua\/index.php\/2010\/11\/27\/301-ndash-permanent-redirect\/"},"modified":"2010-11-27T12:57:35","modified_gmt":"2010-11-27T10:57:35","slug":"301-ndash-permanent-redirect","status":"publish","type":"post","link":"https:\/\/netspider.com.ua\/index.php\/2010\/11\/27\/301-ndash-permanent-redirect\/","title":{"rendered":"301 &ndash; permanent redirect"},"content":{"rendered":"<p>SEO\u0448\u043d\u0438\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u044f\u0442 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441 www. \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0447\u0442\u043e-\u0442\u043e \u043e\u0434\u043d\u043e, \u043a\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u041b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f <em>\u0431\u0435\u0437<\/em> www, \u0442.\u043a. www \u2013 \u043f\u0435\u0440\u0435\u0436\u0438\u0442\u043e\u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e, \u044d\u0434\u0430\u043a\u0438\u0439 \u0430\u0442\u0430\u0432\u0438\u0437\u043c.<\/p>  <h5>Apache<\/h5>  <p>\u0412 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 Apache \u0434\u043b\u044f \u0441\u043a\u043b\u0435\u0439\u043a\u0438, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u0438\u043b\u0438 \u0440\u0435\u0432\u0440\u0430\u0439\u0442 (\u043f\u0440\u0430\u0432\u0438\u043b\u043e). \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2013 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441 \u0434\u043e\u043c\u0435\u043d\u0430 \u0441 www \u043d\u0430 \u0434\u043e\u043c\u0435\u043d \u0431\u0435\u0437 www \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 .htaccess, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>  <pre class=\"brush: bash; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">RedirectMatch (.*) https:\/\/domain.tld\/$1<\/pre>\n\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043a mod_rewrite \u0438 \u0434\u043e\u043c\u0435\u043d \u0443 \u0432\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n\n<pre class=\"brush: bash; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">Options +FollowSymLinks\nRewriteEngine on\nRewriteBase \/\nRewriteCond %{HTTP_HOST} !^www.domain.tld$ [NC]\nRewriteRule ^(.*)$ https:\/\/www.domain.tld\/$1 [R=301,NC]<\/pre>\n\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u0441 domain.tld \u043d\u0430 www.domain.tld, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0435 &quot;www&quot;.<\/p>\n\n<h5>Nginx<\/h5>\n\n<p>\u0412 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 nginx, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0434\u043e\u043c\u0435\u043d\u0430 \u0441 www \u043d\u0430 \u0434\u043e\u043c\u0435\u043d \u0431\u0435\u0437 www, \u043f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 server{} \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n\n<pre class=\"brush: bash; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">if ($host != 'domain.tld' ) {\n   rewrite  ^\/(.*)$  https:\/\/domain.tld\/$1  permanent;\n}<\/pre>\n\n<p>\u041d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0431\u0434\u043e\u043c\u0435\u043d\u044b, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b :), \u043f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e:<\/p>\n\n<pre class=\"brush: bash; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">if ($host = 'www.domain.tld' ) {\n   rewrite  ^\/(.*)$  https:\/\/domain.tld\/$1  permanent;\n}<\/pre>\n\n<p><strong>N.B.<\/strong><\/p>\n\n<p>\u0423\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0412\u043e\u0440\u0434\u041f\u0440\u0435\u0441\u0441 \u0441\u0430\u043c \u0443\u043c\u0435\u0435\u0442 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0442\u044c, \u0432 \u043d\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432:\n  <br \/><\/p>\n\n<pre class=\"brush: text; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u2013&gt; \u041e\u0431\u0449\u0438\u0435<\/pre>\n\n<p>\n  <br \/>\u041f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 &quot;\u0410\u0434\u0440\u0435\u0441 WordPress (URL)&quot; \u0438 &quot;\u0410\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 (URL)&quot; \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0430\u0434\u0440\u0435\u0441, \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441 www \u0438\u043b\u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n\n<p><strong>TIP<\/strong>\n\n  <br \/>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 <a title=\"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 WordPress\" href=\"https:\/\/codex.wordpress.org\/%D0%A0%D0%B0%D0%B7%D0%BC%D0%B5%D1%89%D0%B0%D0%B5%D0%BC_WordPress_%D0%B2_%D0%BE%D1%82%D0%B4%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%BC_%D0%BA%D0%B0%D1%82%D0%B0%D0%BB%D0%BE%D0%B3%D0%B5\">\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 WordPress<\/a>.<\/p>\n\n<p><strong><\/strong><\/p>\n<!--more-->\n\n<h5>\u0420\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445<\/h5>\n\n<p><strong>ColdFusion Redirect<\/strong><\/p>\n\n<pre class=\"brush: text; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">&lt;.cfheader statuscode=&quot;301&quot; statustext=&quot;Moved permanently&quot;&gt;\n&lt;.cfheader name=&quot;Location&quot; value=&quot;https:\/\/domain.tld&quot;&gt;<\/pre>\n\n<p><strong>PHP Redirect<\/strong><\/p>\n\n<pre class=\"brush: php; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">&lt;?php\nHeader( &quot;HTTP\/1.1 301 Moved Permanently&quot; );\nHeader( &quot;Location: https:\/\/domain.tld&quot; );\n?&gt;<\/pre>\n\n<p><strong>ASP Redirect<\/strong><\/p>\n\n<pre class=\"brush: vb; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">&lt;%@ Language=VBScript %&gt;\n&lt;%\nResponse.Status=&quot;301 Moved Permanently&quot;\nResponse.AddHeader &quot;Location&quot;,&quot;https:\/\/domain.tld\/&quot;\n%&gt;<\/pre>\n\n<p><strong>ASP .NET Redirect<\/strong><\/p>\n\n<pre class=\"brush: vb; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">&lt;script runat=&quot;server&quot;&gt;\nprivate void Page_Load(object sender, System.EventArgs e)\n{\nResponse.Status = &quot;301 Moved Permanently&quot;;\nResponse.AddHeader(&quot;Location&quot;,https:\/\/domain.tld);\n}\n&lt;\/script&gt;<\/pre>\n\n<p><strong>JSP (Java) Redirect<\/strong><\/p>\n\n<pre class=\"brush: java; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">&lt;%\nresponse.setStatus(301);\nresponse.setHeader( &quot;Location&quot;, &quot;https:\/\/domain.tld\/&quot; );\nresponse.setHeader( &quot;Connection&quot;, &quot;close&quot; );\n%&gt;<\/pre>\n\n<p><strong>CGI PERL Redirect<\/strong><\/p>\n\n<pre class=\"brush: shell; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">$q = new CGI;\nprint $q-&gt;redirect(&quot;https:\/\/domain.tld\/&quot;);<\/pre>\n\n<p><strong>Ruby on Rails Redirect<\/strong><\/p>\n\n<pre class=\"brush: rails; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;\">def old_action\nheaders[&quot;Status&quot;] = &quot;301 Moved Permanently&quot;\nredirect_to &quot;https:\/\/domain.tld\/&quot;\nend<\/pre>","protected":false},"excerpt":{"rendered":"SEO\u0448\u043d\u0438\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u044f\u0442 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441 www. \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0447\u0442\u043e-\u0442\u043e \u043e\u0434\u043d\u043e, \u043a\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u041b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0431\u0435\u0437 www, \u0442.\u043a. www \u2013 \u043f\u0435\u0440\u0435\u0436\u0438\u0442\u043e\u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e, \u044d\u0434\u0430\u043a\u0438\u0439 \u0430\u0442\u0430\u0432\u0438\u0437\u043c. Apache \u0412 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 Apache \u0434\u043b\u044f \u0441\u043a\u043b\u0435\u0439\u043a\u0438, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u0438\u043b\u0438 \u0440\u0435\u0432\u0440\u0430\u0439\u0442 (\u043f\u0440\u0430\u0432\u0438\u043b\u043e). \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2013 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438\u2026 <span class=\"read-more\"><a href=\"https:\/\/netspider.com.ua\/index.php\/2010\/11\/27\/301-ndash-permanent-redirect\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;<\/a><\/span>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1383,668,1055,1061,1384,1385,925,382,1388,1387,1386,487],"class_list":["post-1095","post","type-post","status-publish","format-standard","hentry","category-main","tag-1383","tag-apache","tag-htaccess","tag-nginx","tag-permanent","tag-reditect","tag-site","tag-wordpress","tag-www","tag-perenapravlenie","tag-redirekt","tag-seo"],"_links":{"self":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts\/1095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/comments?post=1095"}],"version-history":[{"count":0,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/posts\/1095\/revisions"}],"wp:attachment":[{"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/media?parent=1095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/categories?post=1095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netspider.com.ua\/index.php\/wp-json\/wp\/v2\/tags?post=1095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}