Question

I am developing a cms in php. The language section works like this: www.site.com/it/ Default language www.site.com/en/ English language

I you go to www.site.com you are automatically redirected to the default language www.site.com/it/ Doing some testing with some tool, I get 302 temporary redirect.. My question is this error: 302 temporary redirect, is this a problem?

Was it helpful?

Solution

A 302 HTTP response status code is appropriate for your use (language redirection). Moreover, the 300-class status codes do not indicate an error unlike 400-class status codes, which indicate a client error, and the 500-class status codes, which indicate a server error.

A 303 status code may be even better, but for interoperability reasons, 302 is well-understood by all Web browsers. See W3C's "HTTP/1.1: Status Code Definitions" for more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top