301,302 都是 HTTP 状态的编码,都代表着某个 URL 发生了转移,不同之处在于: 301 redirect: 301 代表永久性转移( Permanently Moved )。 302 redirect: 302 代表暂时性转移( Temporarily Moved )。
301
302
HTTP
URL
301 redirect
Permanently Moved
302 redirect
Temporarily Moved
其实 301、302 的重定向都是通过对 http协议 的 location 的修改来实现的
http协议
location
Last updated 5 years ago