Page MenuHomePhabricator

Mobile redirect should happen after www.wikipedia.org -> en.wikipedia.org redirect
Closed, ResolvedPublic

Description

Author: eric.case

Description:
Hi folks,

We just noticed the following:

  1. in Safari/Mac 5.1.5, set your user-agent to Safari iOS 4.3.3/iPhonr
  2. visit www.wikipedia.org/wiki/.is
  3. it redirects to a broken URL — http://www.m.wikipedia.org/wiki/.is

Version: wmf-deployment
Severity: normal
OS: other
Platform: Other

Details

Reference
bz36601

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:28 AM
bzimport set Reference to bz36601.
bzimport added a subscriber: Unknown Object (MLST).

Changing subject to reflect the real issue. This bug is not limited to Safari.

This is apparently the what happens when you access http://wikipedia.org/wiki/not_a_page as well. Maybe we could just take the redirect off of www.wikipedia.org and wikipedia.org.

eric.case wrote:

I'm still seeing this issue:

  1. using Safari/Mac 6.0.1 (8536.26.14), set User Agent to "Safari iOS 5.1 — iPhone"
  2. paste www.wikipedia.org/wiki/.is into the URL bar and try to visit it
  3. get redirected to http://www.m.wikipedia.org/wiki/.is with this error: "Safari can't open the page "http://www.m.wikipedia.org/wiki/.is" because Safari can't find the server "www.m.wikipedia.org"

eric.case wrote:

The problem is that your redirect isn't adding a locale by default.

For mobile user agents, www.wikipedia.org/wiki/.is

redirects to www.m.wikipedia.org/wiki/.is (which doesn't work)

instead of en.m.wikipedia.org/wiki/.is (which does work).

As a workaround we'll hard-code en. in our app until this is fixed.

-Eric

Simple command to reproduce it:
wget -U "Safari iOS 4.3.3/iPhone" http://www.wikipedia.org/wiki/.is

I've been able to reproduce this with an Android device as well as iOS devices.