开发者

What causes a HTTP 302?

The question is in the title - what causes a HTTP 开发者_开发百科302?


It's a redirection, not an error. RFC2616 describes it as indicating:

The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests.

Note that you should only use HTTP 302 redirects for temporary redirections, not permanent ones. Permanent redirections should be implemented using an HTTP 301, instead.

You can avoid it by not issuing an HTTP 302 redirect in your code.

Find more information in the Wikipedia article, and in the answers to this related question.


It's redirection somewhere of your code may set the limits to that cause the problem in a nutshell, it's all about your code


See the guidance on w3.org.

It's actually a temporary URI redirection. It is also very common to see this when using ASP.NET - performing a server side Response.Redirect() will result in a 302.


If you are using CodeIgniter please check url helper and find 302 replace this with 301. This is the main issue for CI based 302 redirects if we use hooks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜