Redirecting to mobile Wikipedia

Wikipedia both has a traditional and progressive website that is shown on mobile devices. After years the progressive website is still not shown on desktops sadly enough, but with a browser plugin a redirect can be triggered to the mobile site in most browsers. This as the Redirector plugin works at least in Mozilla Firefox, Google Chrome and Chromium, and will most likely also work in future when Microsoft Edge switches to the Chromium engine.

The configuration in JSON-format below can be imported to setup the Redirector plugin. After enabling the redirect rules, the browser should redirect the Wikipedia to the mobile Wikipedia website.

{
    "createdBy": "Redirector v3.2",
    "createdAt": "2019-04-05T16:30:43.187Z",
    "redirects": [
        {
            "description": "Wikipedia",
            "exampleUrl": "https://en.wikipedia.org/wiki/Wikipedia:About",
            "exampleResult": "https://en.m.wikipedia.org/wiki/Wikipedia:About",
            "error": null,
            "includePattern": "https://([a-z]{2}).(wikipedia|wiktionary|wikiquote|wikisource|wikibooks|wikiversity|wikinews|wikivoyage).org/wiki/(.+)",
            "excludePattern": "\\.m\\.wikipedia\\.org",
            "patternDesc": "",
            "redirectUrl": "https://$1.m.$2.org/wiki/$3",
            "patternType": "R",
            "processMatches": "noProcessing",
            "disabled": false,
            "appliesTo": [
                "main_frame"
            ]
        }
    ]
}

For now the configuration should cover the main Wikipedia websites and a most of the sub-projects in all languages.

Update 2019-05-25: Adding redirect for Twitter.

{
    "createdBy": "Redirector v3.2",
    "createdAt": "2019-05-24T20:05:14.345Z",
    "redirects": [
        {
            "description": "Twitter",
            "exampleUrl": "https://twitter.com/notifications",
            "exampleResult": "https://mobile.twitter.com/notifications",
            "error": null,
            "includePattern": "https://twitter.com/(.+)",
            "excludePattern": "",
            "patternDesc": "",
            "redirectUrl": "https://mobile.twitter.com/$1",
            "patternType": "R",
            "processMatches": "noProcessing",
            "disabled": false,
            "appliesTo": [
                "main_frame"
            ]
        }
    ]
}

Published by Hans Spaans

Unix & security consultant with a passion for Linux, Solaris, PostgreSQL, Perl and network services, but also a strong believer in open and free source, standards and content.