Front page should not redirect 3 times.

RESOLVED FIXED in 2014Q2

Status

P3
normal
RESOLVED FIXED
8 years ago
4 years ago

People

(Reporter: wenzel, Assigned: rrosario)

Tracking

unspecified
2014Q2
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

8 years ago
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
Flags: in-testsuite?
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"

Updated

4 years ago
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.
(Assignee)

Comment 3

4 years ago
(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 /.
(Assignee)

Comment 5

4 years ago
Next sprint.
Priority: -- → P3
Whiteboard: u=user c=general p=1 s=2014.9
Target Milestone: --- → 2014Q2
(Assignee)

Comment 6

4 years ago
I consulted with the sumo team and they gave us the green light to remove "home" from the url \o/
(Assignee)

Updated

4 years ago
Assignee: nobody → rrosario
(Assignee)

Comment 7

4 years ago
In a pull request:
https://github.com/mozilla/kitsune/commit/51dc04163583a467fd4d3450e3c2e77c93af5b16
Whiteboard: u=user c=general p=1 s=2014.9 → u=user c=general p=1 s=2014.8
(Assignee)

Comment 8

4 years ago
(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
(Assignee)

Comment 10

4 years ago
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
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Reporter)

Comment 11

4 years ago
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.