Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug1200464] Fixed the redirection bugs in ja locale #3266

Merged
merged 1 commit into from Sep 8, 2015
Merged

[bug1200464] Fixed the redirection bugs in ja locale #3266

merged 1 commit into from Sep 8, 2015

Conversation

chikoski
Copy link
Contributor

@chikoski chikoski commented Sep 1, 2015

This pull request will change the site's redirection settings to fix the bug1200464, which navigate users who attempt to access ja-localzed relesenotes to wrong address.

RewriteRule ^/ja/(firefox|thunderbird)/(\d+\.\d+(\.\d+)*)(beta)?/releasenotes(/?|/.+)$ http://mozilla.jp/firefox/$1/$2$3/releasenotes/ [L,R=301]
RewriteRule ^/ja/mobile/(\d+\.\d+(\.\d+)*)(beta)?/releasenotes(/?|/.+)$ http://mozillla.jp/firefox/android/$1$2/releasenotes/ [L,R=301]
RewriteRule ^/ja/(firefox|thunderbird)/((android/)?\d+\.\d+(\.\d+)*(beta)?)/releasenotes(/?|/.+)$ http://mozilla.jp/$1/$2/releasenotes/ [L,R=301]
RewriteRule ^/ja/mobile/(\d+\.\d+(\.\d+)*(beta)?)/releasenotes(/?|/.+)$ http://mozillla.jp/firefox/android/$1$2/releasenotes/ [L,R=301]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mozilla.jp currently redirects to www.mozilla.jp, so we should probably save a redirect and change the targets of all of these redirects to www.mozilla.jp -- this will also fix the 'mozillla' typo on line 132, which I missed earlier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think that we can safely remove line 132 entirely, as /ja/mobile/ should get redirected to /ja/firefox/android/ which would then get caught by the single rule on 131. Also, I believe we can simplify the instances of \d+\.\d+(\.\d+)* to a more readable [0-9.]+, and (/?|/.+) can be safely simplified to /?. How about something like this?

RewriteRule ^/ja/(firefox|thunderbird)/((android/)?[0-9.]+(beta)?)/releasenotes/?$ http://mozilla.jp/$1/$2/releasenotes/ [L,R=301]

@chikoski chikoski changed the title Fixed the bug1200464 [bug1200464] Fixed the redirection bugs in ja locale Sep 7, 2015
Changed the redirection setting which navigates users with ja-locale to
wrong Japanese localized releasenotes.

Updated the redirection rule which navigate ja-locale users to Japanese localized releasenotes, to navigate the accesses to Fennec's releasenotes to their Japanese version as well

update redirection rules with review comments

shortened the redirection rule which redirects Japanese releasenotes to mozilla.jp. Also, a bug in a redirection rule is fixed

fixed a redirection bug, which doubled slash in the URL when it redirect ja-locale users to beta releasenotes
@pmclanahan
Copy link
Contributor

Looks much better! Thanks!

pmclanahan pushed a commit that referenced this pull request Sep 8, 2015
[bug1200464] Fixed the redirection bugs in ja locale
@pmclanahan pmclanahan merged commit 81d996a into mozilla:master Sep 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants