views:

16

answers:

2

Hi,

I have this URL: http://example.com/website/ then I check user country based on geoip and redirect them to: http://example.com/website/en/, http://example.com/website/pt/ etc..

Witch code should I use for this redirect 301, 302 or other?

cheers

A: 

I would go with 303 See Other.

Ken Struys
+1  A: 

You ought to go with 307 Temporary Redirect:

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

That way you won't run into snags with search engines purging the page.

Gert G
Also ensure that the Cache-Control and/or Expires headers specify an appropriate caching period.
devstuff