Last Comment Bug 1014823 - Redirect /.+/firefox/releases/whatsnew/ (404) to /firefox/whatsnew/
: Redirect /.+/firefox/releases/whatsnew/ (404) to /firefox/whatsnew/
Status: VERIFIED FIXED
:
Product: www.mozilla.org
Classification: Other
Component: Bedrock (show other bugs)
: Production
: x86 Mac OS X
-- normal
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-22 13:18 PDT by Chris More [:cmore]
Modified: 2015-01-13 13:20 PST (History)
6 users (show)
See Also:
Locale:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
bedrock PR 2643 (44 bytes, text/x-github-pull-request)
2015-01-12 21:31 PST, Josh Mize [:jgmize]
no flags Details | Review | Splinter Review

Description User image Chris More [:cmore] 2014-05-22 13:18:14 PDT
Our #1 404 is to this URL now:

http://www.mozilla.org/en-US/firefox/releases/whatsnew/

We should redirect:

/.+/firefox/releases/whatsnew/

to:

/firefox/whatsnew/

These are mainly redirect traffic from all over the world.
Comment 1 User image raymond [:retornam] (inactive) 2014-05-23 12:45:44 PDT
(In reply to Chris More [:cmore] from comment #0)
> Our #1 404 is to this URL now:
> 
> http://www.mozilla.org/en-US/firefox/releases/whatsnew/
> 
> We should redirect:
> 
> /.+/firefox/releases/whatsnew/
> 
> to:
> 
> /firefox/whatsnew/
> 
> These are mainly redirect traffic from all over the world.

Chris,

I submitted https://github.com/mozilla/bedrock/pull/2043 which only takes care of the en-US case. Please let me know if I should let this apply to all other locales.
Comment 2 User image Chris More [:cmore] 2014-05-25 06:25:46 PDT
(In reply to raymond [:retornam] (needinfo? me) from comment #1)
> (In reply to Chris More [:cmore] from comment #0)
> > Our #1 404 is to this URL now:
> > 
> > http://www.mozilla.org/en-US/firefox/releases/whatsnew/
> > 
> > We should redirect:
> > 
> > /.+/firefox/releases/whatsnew/
> > 
> > to:
> > 
> > /firefox/whatsnew/
> > 
> > These are mainly redirect traffic from all over the world.
> 
> Chris,
> 
> I submitted https://github.com/mozilla/bedrock/pull/2043 which only takes
> care of the en-US case. Please let me know if I should let this apply to all
> other locales.

happens for all locales and shouldn't be only for en-US.
Comment 3 User image raymond [:retornam] (inactive) 2014-06-13 08:37:01 PDT
https://github.com/mozilla/bedrock/pull/2043 has been updated to cover all locales and is waiting for review
Comment 4 User image Pascal Chevrel:pascalc 2014-06-13 08:38:55 PDT
Why listing all the locales (which is a changing list over time) instead of matching our locale codes with a regex?
Comment 5 User image Chris More [:cmore] 2014-06-16 10:52:20 PDT
(In reply to Pascal Chevrel:pascalc from comment #4)
> Why listing all the locales (which is a changing list over time) instead of
> matching our locale codes with a regex?

I agree. I made that same comment here:

https://github.com/mozilla/bedrock/pull/2043
Comment 6 User image [github robot] 2014-06-19 10:13:44 PDT
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/688064fc200461c6f81199d25cb4f1421b362384
Bug 1014823 - Redirect /.+/firefox/releases/whatsnew/ (404) to /firefox/whatsnew/

https://github.com/mozilla/bedrock/commit/a2829c6e5bccc050ca87b8c67ad118456c835f91
Merge pull request #2043 from retornam/bug-1014823-whatsnew

Bug 1014823 - Redirect /.+/firefox/releases/whatsnew/ (404) to /firefox/...
Comment 7 User image Josh Mize [:jgmize] 2015-01-12 15:04:49 PST
The commit from comment #6 had a bug in it: it was a PT instead of a 301 redirect, which got the expected behavior when there was a locale in the URL, but when the locale was missing it caused a problem:

/firefox/releases/whatsnew/ 301 -> 
/firefox//en-US/firefox/whatsnew/ 301 ->
/firefox/en-US/firefox/whatsnew/ 301 ->
/en-US/firefox/en-US/firefox/whatsnew/ 404
Comment 8 User image Chris More [:cmore] 2015-01-12 15:49:30 PST
(In reply to Josh Mize [:jgmize] from comment #7)
> The commit from comment #6 had a bug in it: it was a PT instead of a 301
> redirect, which got the expected behavior when there was a locale in the
> URL, but when the locale was missing it caused a problem:
> 
> /firefox/releases/whatsnew/ 301 -> 
> /firefox//en-US/firefox/whatsnew/ 301 ->
> /firefox/en-US/firefox/whatsnew/ 301 ->
> /en-US/firefox/en-US/firefox/whatsnew/ 404

Nice catch! Thanks, Josh!
Comment 9 User image Josh Mize [:jgmize] 2015-01-12 21:31:33 PST
Created attachment 8547951 [details] [review]
bedrock PR 2643
Comment 10 User image [github robot] 2015-01-13 11:02:38 PST
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/16d1f8f40980de7e87304a4c11c63c0eb51ee655
Fix bug 1014823 redirect and remove redundant rule

https://github.com/mozilla/bedrock/commit/ad4c7a534cf2d007cb63fa3384db87925398f067
Merge pull request #2643 from mozilla/fix-firefox-releases-whatsnew-redirect

Fix bug 1014823 redirect
Comment 11 User image Paul [:pmac] McLanahan 2015-01-13 13:20:40 PST
In prod. Seems good. We'll have to watch the logs.

Note You need to log in before you can comment on or make changes to this bug.