Closed Bug 619496 Opened 14 years ago Closed 11 years ago

Front page should not redirect 3 times.

Categories

(support.mozilla.org :: Code Quality, task, P3)

Tracking

(Not tracked)

RESOLVED FIXED
2014Q2

People

(Reporter: wenzel, Assigned: rrosario)

Details

(Whiteboard: u=user c=general p=1 s=2014.8)

When you go to support.mozilla.com, you are redirected a total of 3 times before the front page is served. This should be only one redirect, two if you really have to. The final redirect from home to home/ is just a waste. ---- % curl -I -L http://support.mozilla.com/ HTTP/1.1 301 MOVED PERMANENTLY Server: Apache Vary: Accept-Language, Accept-Encoding X-Backend-Server: pm-app-sumo04 Content-Type: text/html; charset=utf-8 Date: Wed, 15 Dec 2010 22:12:27 GMT Location: http://support.mozilla.com/en-US/ Keep-Alive: timeout=5, max=998 Accept-Ranges: bytes x-frame-options: DENY Connection: Keep-Alive Content-Length: 0 X-Cache-Info: cached HTTP/1.1 301 MOVED PERMANENTLY Server: Apache X-Backend-Server: pm-app-sumo02 Vary: Accept-Encoding Content-Type: text/html; charset=utf-8 Date: Wed, 15 Dec 2010 22:17:12 GMT Location: http://support.mozilla.com/en-US/home Transfer-Encoding: chunked Connection: Keep-Alive x-frame-options: DENY X-Cache-Info: caching HTTP/1.1 301 MOVED PERMANENTLY Server: Apache X-Backend-Server: pm-app-sumo01 Vary: Accept-Encoding Content-Type: text/html; charset=utf-8 Date: Wed, 15 Dec 2010 22:17:12 GMT Location: http://support.mozilla.com/en-US/home/ Transfer-Encoding: chunked x-frame-options: DENY X-Cache-Info: caching HTTP/1.1 200 OK Server: Apache X-Backend-Server: pm-app-sumo04 Vary: Accept-Encoding Content-Type: text/html; charset=utf-8 Date: Wed, 15 Dec 2010 22:17:12 GMT Accept-Ranges: bytes x-frame-options: DENY X-Cache-Info: caching Content-Length: 25652
We are still doing 3 redirects, but in a different way: $ curl -I -L http://support.mozilla.org HTTP/1.1 301 Moved Permanently Content-Type: text/html Date: Wed, 30 Apr 2014 22:01:16 GMT Location: https://support.mozilla.org/ Connection: Keep-Alive Content-Length: 0 HTTP/1.1 302 FOUND Server: Apache Vary: Accept-Language,X-Mobile,User-Agent, Accept-Encoding X-Backend-Server: support6.webapp.phx1.mozilla.com Cache-Control: no-cache, must-revalidate Content-Type: text/html; charset=utf-8 Strict-Transport-Security: max-age=31536000 Date: Wed, 30 Apr 2014 22:01:16 GMT Location: https://support.mozilla.org/en-US/ Expires: Thu, 19 Nov 1981 08:52:00 GMT X-XSS-Protection: 1; mode=block Pragma: no-cache Transfer-Encoding: chunked X-Content-Type-Options: nosniff Connection: Keep-Alive X-Robots-Tag: noodp X-Frame-Options: DENY X-Cache-Info: not cacheable; response specified "Cache-Control: no-cache" HTTP/1.1 302 FOUND Server: Apache Vary: X-Mobile,User-Agent, Accept-Encoding X-Backend-Server: support5.webapp.phx1.mozilla.com Cache-Control: no-cache, must-revalidate Content-Type: text/html; charset=utf-8 Strict-Transport-Security: max-age=31536000 Date: Wed, 30 Apr 2014 22:01:16 GMT Location: https://support.mozilla.org/en-US/home Expires: Thu, 19 Nov 1981 08:52:00 GMT X-XSS-Protection: 1; mode=block Pragma: no-cache Transfer-Encoding: chunked X-Content-Type-Options: nosniff Connection: Keep-Alive X-Robots-Tag: noodp X-Frame-Options: DENY Last-Modified: Wed, 30 Apr 2014 22:01:16 GMT X-Cache-Info: not cacheable; response specified "Cache-Control: no-cache"
Component: General → Code Quality
So, two things: 1. The first redirect comes from Apache and the second comes from the locale middleware in Django-land. Pretty sure we can't nix those. 2. We're using HSTS, so that first redirect shouldn't happen a second time. Your browser should go directly to https. 3. We could probably fix the /en-US/ -> /en-US/home redirect. The others, I don't think we can without screwing other things up.
(In reply to Will Kahn-Greene [:willkg] from comment #2) > 3. We could probably fix the /en-US/ -> /en-US/home redirect. The others, I > don't think we can without screwing other things up. I was going to propose we nix /home and serve that view from /. I don't think there is any reason to have /home?
(In reply to Ricky Rosario [:rrosario, :r1cky] from comment #3) > > I was going to propose we nix /home and serve that view from /. I don't > think there is any reason to have /home? I was thinking exactly that. I don't know offhand why we have / and /home or what would break if we nix the redirect and/or just switch /home to /.
Next sprint.
Priority: -- → P3
Whiteboard: u=user c=general p=1 s=2014.9
Target Milestone: --- → 2014Q2
I consulted with the sumo team and they gave us the green light to remove "home" from the url \o/
Assignee: nobody → rrosario
Whiteboard: u=user c=general p=1 s=2014.9 → u=user c=general p=1 s=2014.8
(In reply to Ricky Rosario [:rrosario, :r1cky] from comment #7) > In a pull request: > https://github.com/mozilla/kitsune/commit/ > 51dc04163583a467fd4d3450e3c2e77c93af5b16 GAH that is not a Pull request... here it is: https://github.com/mozilla/kitsune/pull/1936
Deployed to prod... A lot has changed since this was filed. Now we are .org instead of .com. We also are full https. # of redirects can vary: http://support.mozilla.com => 3 redirects https://support.mozilla.com => 2 redirects http://support.mozilla.org => 2 redirects https://support.mozilla.org => 1 redirect This is a good as we can do with our current infra setup. I think it's good enough.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
As the OP here, I concur. I originally filed it because there were too many Django-internal redirects. This is fixed.
You need to log in before you can comment on or make changes to this bug.