aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/http/status/301/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ru/web/http/status/301/index.html')
-rw-r--r--files/ru/web/http/status/301/index.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/files/ru/web/http/status/301/index.html b/files/ru/web/http/status/301/index.html
new file mode 100644
index 0000000000..8456c79e66
--- /dev/null
+++ b/files/ru/web/http/status/301/index.html
@@ -0,0 +1,58 @@
+---
+title: 301 Moved Permanently
+slug: Web/HTTP/Status/301
+tags:
+ - HTTP
+ - Код ответа
+ - Перенаправление
+translation_of: Web/HTTP/Status/301
+---
+<div>{{HTTPSidebar}}</div>
+
+<p>Код перенаправления "<code><strong>301</strong></code><strong><code> Moved Permanently</code></strong>" протокола передачи гипертекста (HTTP) показывает, что запрошенный ресурс был окончательно перемещен в URL, указанный в заголовке {{HTTPHeader("Location")}}. Браузер в случае такого ответа перенаправляется на эту страницу, а поисковые системы обновляют свои ссылки на ресурс (говоря языком SEO, вес страницы переносится на новый URL-адрес).</p>
+
+<p>Даже если спецификация требует, чтобы при выполнении перенаправления, метод и тело запроса не изменялись, не все пользовательские приложения обращают на это внимание, и вы все еще можете столкнуться с программами имеющими этот баг. Именно поэтому код <strong>301 </strong>рекомендуется только в качестве ответа на {{HTTPMethod("GET")}} или {{HTTPMethod("HEAD")}} запрос, а для {{HTTPMethod("POST")}} рекомендуется код {{HTTPStatus("308", "308 Permanent Redirect")}}, так как он явно запрещает изменение метода запроса.</p>
+
+<h2 id="Статус">Статус</h2>
+
+<pre class="syntaxbox notranslate">301 Moved Permanently</pre>
+
+<h2 id="Пример">Пример</h2>
+
+<h3 id="Запрос_клиента">Запрос клиента</h3>
+
+<pre class="notranslate">GET /index.php HTTP/1.1
+Host: www.example.org</pre>
+
+<h3 id="Ответ_сервера">Ответ сервера</h3>
+
+<pre class="notranslate">HTTP/1.1 301 Moved Permanently
+Location: http://www.example.org/index.asp</pre>
+
+<h2 id="Характеристики">Характеристики</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Спецификация</th>
+ <th scope="col">Название</th>
+ </tr>
+ <tr>
+ <td>{{RFC("7231", "301 Redirect Permanently" , "6.4.2")}}</td>
+ <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Совместимость_с_браузером">Совместимость с браузером</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("http.status.301")}}</p>
+
+<h2 id="Смотрите_также">Смотрите также</h2>
+
+<ul>
+ <li>{{HTTPStatus("308", "308 Permanent Redirect")}}</li>
+ <li>{{HTTPStatus("302", "302 Found")}}, временное перенаправление</li>
+</ul>