Ian, That's it! The following script:
<?php echo $_SERVER[HTTP_ACCEPT_LANGUAGE]; ?> ..generates the following output using Safari: en-us, ja;q=0.21, de-de;q=0.86, de;q=0.79, fr-fr;q=0.71, fr;q=0.64, nl-nl;q=0.57, nl;q=0.50, it-it;q=0.43, it;q=0.36, ja-jp;q=0.29, en;q=0.93, es-es;q=0.14, es;q=0.07 ..and the following output using Windows IE 6.0.2800.1106: en-us I don't understand why Safari presents itself as supporting so many languages. However, the match on 'ja' is clearly what's causing the redirect. It's a positive match for stristr. As a PHP coder by profession, I would suggest testing for the presence of 'ja' in $_SERVER[HTTP_ACCEPT_LANGUAGE] and the absence of 'macintosh' (!eregi('macintosh')) in $_SERVER[HTTP_USER_AGENT]. Of course, I imagine you have a number of other tests taking place which will complicate things a bit. In any case, it's the test for 'ja' that's causing Safari to head to the Japanese page. Thanks! -s On Wed, 12 Nov 2003 10:55:57 +0000 Ian Clarke <[EMAIL PROTECTED]> wrote: > S wrote: > > Question 1: > > > > When I point my Macintosh (using Safari) at freenetproject.org, I am > > redirected to http://de-co.info/freenet/ which is the Japanese Freenet > > page. My Windows and FreeBSD machines, at the same IP address, wind up > > at the normal English Freenet page. I have seen this issue raised before > > on this list with no resolution. I see no reason that Mac users should > > be getting forwarded to the Japanese page. > > The relevant piece of PHP code is: > > if (stristr($_SERVER["HTTP_ACCEPT_LANGUAGE"], "ja")) { > header("Location: http://de-co.info/freenet/"); > exit(); > } > > Can you think of any reason that your browser would be telling web > servers that you read Japanese? > > Ian. > > _______________________________________________ > Support mailing list > [EMAIL PROTECTED] > http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support _______________________________________________ Support mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support