Closed Bug 274291 Opened 20 years ago Closed 19 years ago

Use content negotiation on getfirefox.com

Categories

(mozilla.org Graveyard :: Server Operations, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 378677

People

(Reporter: annevk, Assigned: rebron)

References

()

Details

(Keywords: l12y)

Steps to reproduce the problem:

 1a. Set your Accept-Language header to something different then en-US
 1b. Try nl-NL for instance.
 2.  Go to <http://getfirefox.com/>

Expected results:

 End up at <http://www.mozilla-europe.org/nl/products/firefox/>

Actual results:

 I ended up at <http://www.mozilla.org/products/firefox/>
I'd say the same should apply to http://www.getthunderbird.com/
Thanks for filing this, Anne.
mozilla-japan.org might be interested in this as well.

justdave, are you the person who can fix this?
Mozilla Japan has registered original domains:

http://GetFirefox.jp/
 -> http://www.mozilla-japan.org/products/firefox/

http://GetThunderbird.jp/
 -> http://www.mozilla-japan.org/products/thunderbird/

Of course, it's a good idea to use content negotiation worldwide.
Keywords: l12y
Right now it's just a straight-out 302 redirect enforced in the apache config. 
I don't know of any way to do this based on the Accept-Language header without
either putting a CGI script on it that knows how to parse it, or dropping a
bunch of index.html.xx files in with META refresh tags in them.  The latter
would be quite sloppy in my opinion (META refresh isn't globally honored anyway).
Querying google for "redirect based on Accept-Language" turned up this result:
<http://search.cpan.org/~dorian/Apache-LangURI-0.19/LangURI.pm>.

Dave wasn't sure whether it would be executed before or after mod_rewrite, does
anyone know?
Who needs to cc'ed to make this happen?
Someone with authority over that domain (i.e. the people I just CCed) needs to
tell me they want this first, then I can make it happen.
I'll talk with the rest of the SFX team and get back to you all soon.
I'd like to ask rafael@meer.net to take ownership of this to make this happen as
he is focused full-time on our product marketing.  We should be leveraging our
international affiliates effectively.  Also, could we ensure that this domain is
under the management of the Mozilla Foundation?  justdave?  
Ben Goodger owns the domain, but we have DNS control over it.
(In reply to comment #8 by Asa)
> I'll talk with the rest of the SFX team and get back to you all soon.

Any word on this?
Priority: -- → P4
+1

I made flyers for French noobs and I must write
<http://www.mozilla-europe.org/fr/products/firefox/> because
http://getfirefox.com  is in english...

This bug must be fixed :)
In a server with Apache 1.3.33 I had just put this .htaccess:
--------------------------------------
AddLanguage en .en
AddLanguage en-gb .en
AddLanguage en-us .en

AddLanguage fr .fr
AddLanguage fr-FR .fr
AddLanguage fr-CH .fr
#...

Options MultiViews
--------------------------------------

And I created two files:
index.html.en
index.html.fr

It works but without redirection. I think that getfirefox.com's Apache server is
not compiled with PHP but Perl. I don'’t know perl but in php it is enough to
replace index.html.var by index.php.var. index.php.var will contain :
<?php
header("Location: http://www.votresite.com/unepage.htm");
exit();
?>

If it is possible to got a variable with the value of Accept-language, we could
write (with mod_rewrite) :
--------------------------------------
RewriteCond %{VAR???}  ^fr*
RewriteRule ^.*$  http://www.mozilla-europe.org/fr/products/firefox/
#...
--------------------------------------
But I haven't found this variable.

Note: my English is approximate.
(In reply to comment #13)
> If it is possible to got a variable with the value of Accept-language, we
> could write (with mod_rewrite) :

Yep, RewriteCond is exactly how you'd do it.  We're not stuck on how to do it,
we're stuck on whether the correct people have authorized it to happen, and what
sites to redirect which languages to.

According to cbeard, Rafael gets to make this call, so reassigning the bug to
him.  Reassign it back to me when we're ready to implement.
Assignee: justdave → rebron
Priority: P4 → --
Justin is now the QA for this component.
QA Contact: myk → justin
Marketing, give us the "go!" and we can implement!

Here are some untested, but possible rewrites:

# catch all the eu languages for firefox
RewriteCond %{HTTP:Accept-Language} ^ca.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/ca/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^cs.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/cs/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^da.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/da/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^de.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/de/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^el.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/el/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^en.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/en/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^es.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/es/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^eu.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/eu/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^fi.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/fi/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^fr.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/fr/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^hu.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/hu/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^it.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/it/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^lt.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/lt/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^nl.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/nl/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^pl.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/pl/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^pt.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/pt/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^ro.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/ro/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^sk.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/sk/products/firefox/
RewriteCond %{HTTP:Accept-Language} ^tr.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/tr/products/firefox/

# final catchall
RewriteRule ^/.*$ http://www.mozilla.com/firefox

And for thunderbird...

# eu domains...
RewriteCond %{HTTP:Accept-Language} ^ca.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/ca/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^cs.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/cs/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^da.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/da/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^de.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/de/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^el.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/el/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^en.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/en/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^es.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/es/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^eu.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/eu/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^fi.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/fi/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^fr.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/fr/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^hu.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/hu/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^it.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/it/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^lt.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/lt/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^nl.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/nl/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^pl.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/pl/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^pt.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/pt/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^ro.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/ro/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^sk.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/sk/products/thunderbird/
RewriteCond %{HTTP:Accept-Language} ^tr.*$
RewriteRule ^/.*$ http://www.mozilla-europe.org/tr/products/thunderbird/

# catch all 
RewriteRule ^/.*$ http://www.mozilla.com/thunderbird/


Note that the use of Apache rewrite rules for this is not very reliable at all, as the Accept-Lanugage header can supply multiple languages with priorities listed on them, and the mere presense of a language in the header does not mean it's the best choice.

A better option would be to put META Refresh headers in html documents, and create a document for each language code, and let mod_negotiate figure out which document to pull.

name them index.ca.html, index.ja.html, index.es.html, etc.
sysadmins -

This is great timing. We've been looking at ways to improve international users' experience when coming to mozilla.com for info on our products. There's a wiki that's been set up to capture international community input on improving mozilla.com for international users at http://wiki.mozilla.org/Mozilla.com/Localization. Short-term, we'd like to enable international users to quickly get to localized Mozilla sites. Longer term, we'd like to work with our international affiliates to create a unified Mozilla web experience for anyone regardless of their language. As a next step on this bug, can we meet the week of Jan. 2 to review our options? Redirecting users based on their locale is one solution but may hamper international users who do actually want to see the English language content at www.mozilla.com/firefox. 
Per Paul's blog:

The solution we are proposing is to add a dropdown menu to the footer area of these 3 web pages, that allows a visitor to select their language, from a list that matches the currently available set of localized Mozilla Web sites.
------

Given there is no more sysadmin involvement here, going to close this bug.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
this was fixed in bug #378677, changing resolution
Resolution: WONTFIX → DUPLICATE
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.