You can combine the two lines:
PHP Code:
header ('Location: http://www.domain.com/', 301);
Just to cut down on parser overhead.
As far as I know, Geolocation was not built into the HTTP specification, and the only codes that exist for redirection are 301 and 302. However, use of the 301 redirect could have the potential of impacting the indexing of the page doing the redirection. If the spider sees a 301, not only could you risk a red flag if bots from some IP addresses are redirected and others aren't, but the original page may not be indexed at all. The spider typically expects that if redirection is occurring, all users will be sent to the destination of the 301, so link weight will be passed through the redirect, and the redirection target can replace the original page in the index.
I don't have to much experience setting these types of redirects up, but I am sure someone else will be able to provide some ideas of possible workarounds that would avoid these issues.