Closed Bug 755826 Opened 12 years ago Closed 12 years ago

Redirect www.mozilla.org/zh-CN to firefox.com.cn

Categories

(www.mozilla.org :: General, defect)

x86
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cmore, Assigned: pmac)

Details

(Whiteboard: u=user c=bedrock p=1)

Attachments

(4 files)

Please set up a custom redirect for Mozilla.org to redirect based on locale and/or URL.

Users that have their browser set to zh-CN as their primary locale, should get redirected to www.mozilla.org/zh-CN and then www.mozilla.org/zh-CN should redirected to www.mozilla.org.cn. Regardless if you went to www.mozilla.org/zh-CN directly or www.mozilla.org with a zh-CN primary browser locale, you should be redirected to www.mozilla.org.cn.

The main contacts for this redirect is Hong Tang and Yousheng Li.
Assignee: nobody → anthony
Severity: normal → major
Rik: Can you check into this and see what kind of implications there are with doing a redirect like this without breaking future localized versions of www.mozilla.org's homepage?
There's also some code in includes/prefetch.php to redirect to external sites. I think there's a Japanese site that does this already.

Not sure why IT thought this was an IT thing, might be worth asking them about that.
shyam: Can you update this bug after you talk to IT?
Snippet from the email I sent out earlier to a few folks involved in this :

Action Items:

1) IT will point mozilla.org in China to 223.202.6.26

2) Mozilla Online will redirect mozilla.org -> mozilla.org.cn locally on their setup

3) This will bypass the Zeus in China and make sure that everyone in
China hits mozilla.org.cn

I don't think app code should be modified for this at all.

(In reply to James Long (:jlongster) from comment #2)

> Not sure why IT thought this was an IT thing, might be worth asking them
> about that.

Because we control the DNS for mozilla.org :) and the objective is to send users inside China to mozilla.org.cn, not all of zh-CN to mozilla.org.cn
Thanks a lot!
I updated the mozilla.org.cn and set up mozilla.org on the 223.202.6.26.
You can point mozilla.org in China to 223.202.6.26 now.
Hi Shyam,
Meet a new problem:
If you point mozilla.org in China to 223.202.6.26, I have to setup all of the service of mozilla.org, like mozilla.org/firefox/ (the new website of mozilla.com).

But now, I haven't get all of the document, and it may lost some service.

I think it is much better: you set up the mirror of mozilla.org on the the blade server of China new data center(like AMO), and rewrite mozilla.org/zh-CN to mozilla.org.cn.
I try to setup all of the service on mozilla.org.cn, it is much better if you can give me much more information like nginx config and others.
Thanks!
(In reply to Yousheng Li from comment #6)

> I think it is much better: you set up the mirror of mozilla.org on the the
> blade server of China new data center(like AMO), and rewrite
> mozilla.org/zh-CN to mozilla.org.cn.

I'm not going to do that because that re-write is a hack. It will be a non-standard rewrite on the load balancer and webops doesn't want to do that, which is understandable. 

There is no content in China, it's only cached on the load balancers.
(In reply to Yousheng Li from comment #5)
> Thanks a lot!
> I updated the mozilla.org.cn and set up mozilla.org on the 223.202.6.26.
> You can point mozilla.org in China to 223.202.6.26 now.

This is done.
I test mozilla.org, it works, thanks a lot!
Looking at this, is there anything needed from Webdev? Can we move this to the appropriate component if not.
Assignee: anthony → nobody
(In reply to Anthony Ricaud (:rik) from comment #11)
> Looking at this, is there anything needed from Webdev? Can we move this to
> the appropriate component if not.

I'll let Chris decide where this should go, since he filed it :)
Talked to Shyam, point mozilla.org in China to 223.202.6.26 is not a good solution. The service like SSL is not ready. Shyam pointed it back.

Sounds like to we need to go back to the original solution:
 Please redirect www.mozilla.org/zh-CN to www.mozilla.org.cn,
 and we can start to submit ICP registration as soon as possible.

In the meantime :
1. James helps to setup the location mechanism (zh-CN). Hard code needs change to resource files.
2. we will translate the resource files append the ICP number to the localized page.
Shyam: I just want to make sure we are on the same page with this. Were the changes backed out?

Yousheng: To clarify, only traffic originating from Chine to www.mozilla.org should be redirected to www.mozilla.org.cn or ALL traffic to www.mozilla.org/zh-CN should be redirected?

Thanks
Hi Chris, to redirect zh-CN to mozilla.org.cn is more straight forward, I think.
To the most of people in China,  it happens like that:
http://www.mozilla.org --> http://www.mozilla.org/zh-CN/ ---> http://www.mozilla.org.cn

Now we only need to take care of the second "-->"
What if there was someone in the United States, or any country outside of China that had their browser set to zh-CN, should they also be redirected to www.mozilla.org.cn? (this does not sound ideal)

As for the Django side, I'm worried about www.mozilla.org and www.mozilla.org.cn going down two different paths in terms of technology and content. How can we keep www.mozilla.org.cn up to date with what we are doing on www.mozilla.org? What if you set up an automated refresh from github.com of the master branch and zh-CN locales? This way, we (Mozilla + L10N Contributors) continue to maintain www.mozilla.org/zh-CN locally, and your servers just pull it on to your side and display www.mozilla.org.cn/zh-CN without having to do any unique translations?
I'm with Chris. This is exactly what I've been suggesting all along.
(In reply to Chris More [:cmore] from comment #16)
> What if there was someone in the United States, or any country outside of
> China that had their browser set to zh-CN, should they also be redirected to
> www.mozilla.org.cn? (this does not sound ideal)

I have thought of this kind of possibility, but I was thinking of there will be not many such case. 
I agree with your the following suggestion:

> As for the Django side, I'm worried about www.mozilla.org and
> www.mozilla.org.cn going down two different paths in terms of technology and
> content. How can we keep www.mozilla.org.cn up to date with what we are
> doing on www.mozilla.org? What if you set up an automated refresh from
> github.com of the master branch and zh-CN locales? This way, we (Mozilla +
> L10N Contributors) continue to maintain www.mozilla.org/zh-CN locally, and
> your servers just pull it on to your side and display
> www.mozilla.org.cn/zh-CN without having to do any unique translations?

Yes, this is exactly what we want, but it may take quite a bit long time. How about we do two things parallel?
1.	temp solution: redirect mozilla.org/zh-CN to mozilla.org.cn first, in this way we could start ICP process right now.
2.	you team setup the localization system on github, I setup the automatic refresh shell from zh-CN branch to mozilla.org.cn. When it finish, we can use this solution.
Our L10N community is SVN and Verbatim as their L10N framework and those strings are not on Github. We should probably loop in pascalc so verify we are not breaking anything by doing this.

I'm still concerned about non-China based zh-CN users hitting Mozilla.org and I can probably determine that would a look at our web statistics. Let me find out so we know how many people we are talking about.
Pulled from Webtrends
Pulled from Webtrends
Please see the two above attachments on visitors that have their locale set to zh-CN and their country of origin. There is a fair amount of non-China visitors.
Thank you for your information, I agree with you suggestion, my question is how long do you guys need to setup the locally page?

Considering the problem of the Great Firewall, if it takes a long time, I suggest we can setup redirect rules as the temp solution. 

For the redirect rules, how about just only traffic originating from China to www.mozilla.org is redirected to www.mozilla.org.cn, is it possible?
It appears to do redirects based on location would require an apache module like http://www.maxmind.com/app/mod_geoip.

Fox2Mike: Do you know if we use an apache module like that or ways to redirected traffic based on originating country instead of locale directory?
This goes back to comment #8. IT/Webops doesn't want to do this, as this is is non-standard.
(In reply to Shyam Mani [:fox2mike] from comment #25)
> This goes back to comment #8. IT/Webops doesn't want to do this, as this is
> is non-standard.

Ok, so the only option is to redirect all of zh-CN to www.mozilla.org.cn or nothing at all. Let's get through the June 26th Fennec launch and we'll revisit this redirect. I just don't want to add any additional complexity on Mozilla.org leading up to the release of a responsive Mozilla.org website and all of the new content.
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Jen: here is another one for you to review from a product perspective.
Hi Chris,
Considering the bug 764261, we would like to request for the similar redirection as well, which is
redirect the single page http://www.mozilla.org/zh-CN/ to http://www.firefox.com.cn/ 

I create a patch for it, please see the attachment. 
Please note that I am using this in my patch: 
     +RewriteRule ^/zh-CN/$ http://www.firefox.com.cn/ [L,R=301]
for redirect the single page of http://www.mozilla.org/zh-CN/

Please let me know your comment or question.
Thanks a lot!
(In reply to Yousheng Li [:yli] from comment #29)
> Created attachment 702218 [details]
> Patch of redirecting mozilla.org/zh-CN/ to firefox.com.cn

What are we doing to about key in-product referenced pages like /plugincheck /firstrun /whatsnew/ that are tied into desktop product?
Hi Chris,

What we plan is just redirect the singe page mozilla.org/zh-CN/
Other pages, like /plugincheck, /firestrun, /whatsnew are stay in the US website.
(In reply to Yousheng Li [:yli] from comment #32)
> Hi Chris,
> 
> What we plan is just redirect the singe page mozilla.org/zh-CN/
> Other pages, like /plugincheck, /firestrun, /whatsnew are stay in the US
> website.

Ok, just to clarify, *only* access to the zh-CN homepage of mozilla.org redirected to www.mozilla.org.cn and not *any* other URLs?
Yes,  *only* redirect the zh-CN homepage.
But redirected url is www.firefox.com.cn.
Thanks!
Summary: Redirect www.mozilla.org/zh-CN to www.mozilla.org.cn → Redirect www.mozilla.org/zh-CN to www.firefox.com.cn
Hi Chris,

The zh-TW redirections are finished: The Bug 764261
What's your plan to redirect the zh-CN for us?

Thanks a lot!
pmac: here is one for the upcoming sprint. This one is a bit easier, *only* the www.mozilla.org/zh-CN/ homepage redirects to firefox.com.cn, but no other URLs.

Yousheng: I noticed that both firefox.com.cn and www.firefox.com.cn both go to the China website. That's not good for SEO and UX. It appears that firefox.com.cn has the highest SEO. I would recommend 301 redirecting www.firefox.com.cn to firefox.com.cn. If so, I recommend that the www.mozilla.org/zh-CN/ redirect point to firefox.com.cn.
Assignee: nobody → pmac
Whiteboard: u=user c=bedrock p=1
Hi Chris,
You are right.
www.firefox.com.cn is 301 redirecting to firefox.com.cn now.
And please *only* redirect www.mozilla.org/zh-CN/ to firefox.com.cn
Thanks a lot!
Summary: Redirect www.mozilla.org/zh-CN to www.firefox.com.cn → Redirect www.mozilla.org/zh-CN to firefox.com.cn
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/3d614e098c10b52f8979c8caa7e336e798be14ab
Bug 755826: Add redirect for zh-CN home page.

https://github.com/mozilla/bedrock/commit/970e908bc046c685a937b5d5e4478f5d5e6248c4
Merge pull request #606 from pmclanahan/bug-755826-redirect-zh-CN-home

Bug 755826: Add redirect for zh-CN home page.
Verified FIXED on staging; tried:

* www.allizom.org -> http://firefox.com.cn/
* allizom.org -> http://firefox.com.cn/
* www.allizom.org/ -> http://firefox.com.cn/
* allizom.org -> http://firefox.com.cn/

This was all using Accept-Language of zh-cn
I tested in China, it works pretty well.
Thanks for all!
:stephend: can you verify that non-homepage URL do *not* redirect? For example /firefox/new/ should not redirect to firefox.com.cn.
(In reply to Chris More [:cmore] from comment #42)
> :stephend: can you verify that non-homepage URL do *not* redirect? For
> example /firefox/new/ should not redirect to firefox.com.cn.

Good call, and my apologies for missing that; you're right, indeed, it's broken:

[18:39:14.819] GET http://www.mozilla.org/firefox/new [HTTP/1.1 301 Moved Permanently 99ms]
[18:39:14.921] GET http://firefox.com.cn/ [HTTP/1.0 200 OK 891ms]

:-(

(This is why we unit/redirect tests as we fix issues and add more: https://github.com/mozilla/mcom-tests/blob/master/tests/test_redirect.py)
pmac: It appears this redirect is redirecting all urls for zh-CN instead of just the homepage. Your ^/zh-TW/$ rewrite rule seems like it should work.

For example:

http://www.allizom.org/zh-CN/firefox/new/
http://www.allizom.org/zh-CN/firefox/
zh-CN/firefox/ is redirected from mozilla.com. This is done by old bugs.

The behavior of zh-CN/firefox/ and zh-CN/firefox/new/ is right now.

You no need to delete this redirect rules.
Yes. On the PHP side there are rules to redirect most content to firefox.com.cn:

http://viewvc.svn.mozilla.org/vc/projects/mozilla.com/trunk/includes/prefetch.php?view=markup#l147

And the list of locales for this code is:

http://viewvc.svn.mozilla.org/vc/projects/mozilla.com/trunk/includes/langconfig.inc.php?view=markup#l274

I see no bugs asking for changes to these so far. I think what we just did is to augment this for the home page.
Are we satisfied with this? I believe this can be closed.
Yes, it works fine, I closed it.
Thanks again for all of your help!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Please confirm, is it:
Redirect www.mozilla.org/zh-CN to firefox.COM.cn
or
Redirect www.mozilla.org/zh-CN to firefox.ORG.cn ?

(was investigating if https://github.com/MozillaOnline was under Mozilla's umbrella or not)
Redirect to firefox.COM.cn is correct, thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: