In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces to you what is the difference between http status code 301 and 302, the content is very detailed, interested friends can refer to, hope to be helpful to you.
The responsibility of the status code (Status Code) is to describe the result of the request returned when the client sends the request to the server.
The standard status code consists of three digits, mainly in the following five categories:
Category reason phrase 1XXInformational (informational status code) the request is being processed 2XXSuccess (success status code) the request has been processed normally 3XXRedirection (redirect status code) requires additional operation to complete the request 4XXClient Error (client error status code) the server cannot process the request 5XXServer Error (server error status code) the server processed the request error
301, 302 and other status codes are components of the status line in the response message.
Meaning of ✔:
301 redirect: 301 represents permanent transfer (Permanently Moved)
302 redirect: 302 represents temporary transfer (Temporarily Moved)
What ✔ has in common: it all means redirection, which means that after getting the status code returned by the server, the browser will automatically jump to a new URL address, which can be obtained from the Location header of the response. (the effect that the user sees is that the address A he entered instantly becomes another address B.)
✔ is different:
1. 301 indicates that the resource of the old address A has been permanently removed (this resource is no longer accessible). The search engine not only grabs the new content, but also exchanges the old URL with the redirected URL.
302 indicates that the resources of the old address An are still available (still accessible). This redirect is only a temporary jump from the old address A to address B. the search engine grabs the new content and saves the old URL.
2, 302 will appear the phenomenon of "URL hijacking", redirect from A URL 302 to B URL, because some search engines cannot always crawl the target URL, or the B URL is not friendly to users, so the browser will still display the A URL, but the web page content used is the content on the B URL.
✔ application scenario
Domain name needs to be switched, and the protocol is changed from http to https.
302: jump to the login page when visiting the login page when not logged in, jump to the home page after 404
On the http status code 301 and 302 what is the difference to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.