Skip to content

Check for link rot and remove / update as appropriate #514

@ianheggie-oaf

Description

@ianheggie-oaf

Problem

Its been ages since the external links where checked and updated.
We have done some as part of the http to https update, but the full system should be checked.

Describe the solution you'd like

Script that checks and recommends actions for review

Describe alternatives you've considered

Additional context

I have a script that can help the process, first part of output (sed is a linux command)

# BROKEN http://www.openaustralia.org/user/\nto (error) in files: scripts/alertgonemps.php, scripts/alertmailer.php
sed -i 's|http://www.openaustralia.org|https://www.openaustralia.org.au/|g' scripts/alertmailer.php www/docs/gadget/debateday.php www/includes/easyparliament/templates/rss/hansard_search.php www/includes/easyparliament/templates/rss/hansard_search.php www/includes/easyparliament/templates/rss/hansard_search.php
sed -i 's|http://www.openaustralia.org/search/?s=|https://www.openaustralia.org.au/search/?s=|g' scripts/alertmailer.php
sed -i 's|http://www.openaustralia.org/D/|https://www.openaustralia.org.au/D/|g' scripts/alertmailer.php
# Ignore 302 redirect http://purl.org/dc/elements/1.1/ to https://purl.org/dc/elements/1.1/ in files: scripts/mprss.php, www/docs/news/rdf.php, www/includes/easyparliament/page.php
sed -i 's|http://www.w3.org/1999/02/22-rdf-syntax-ns#|https://www.w3.org/1999/02/22-rdf-syntax-ns|g' scripts/mprss.php www/docs/news/rdf.php www/includes/easyparliament/page.php
# Ignore 302 redirect http://purl.org/rss/1.0/ to https://purl.org/rss/1.0/ in files: scripts/mprss.php, www/docs/news/rdf.php
# Ignore 302 redirect http://purl.org/rss/1.0/modules/content/ to https://purl.org/rss/1.0/modules/content/ in files: scripts/mprss.php
sed -i 's|http://en.wikipedia.org/wiki/|https://en.wikipedia.org/wiki/Main_Page|g' www/docs/admin/glossary_pending.php
sed -i 's|http://en.wikipedia.org/wiki/Earth_radius|https://en.wikipedia.org/wiki/Earth_radius|g' www/docs/api/api_getConstituencies.php
sed -i 's|http://www.openaustralia.org/api/key|https://www.openaustralia.org.au/api/key|g' www/docs/api/index.php
sed -i 's|http://www.openaustralia.org/api/|https://www.openaustralia.org.au/api/|g' www/docs/api/index.php www/docs/api/index.php www/docs/api/index.php
# BROKEN http://hurring.com/code/python/serialize/ (404) in files: www/docs/api/index.php
# Ignore 302 redirect http://creativecommons.org/licenses/by-nc-nd/3.0/au/ to https://creativecommons.org/licenses/by-nc-nd/3.0/au/ in files: www/docs/api/index.php
# Ignore 302 redirect http://creativecommons.org/licenses/by-sa/2.5/ to https://creativecommons.org/licenses/by-sa/2.5/ in files: www/docs/api/index.php
# Ignore 302 redirect http://www.acooper.org/ to https://adrcooper.com/ in files: www/docs/api/index.php
sed -i 's|https://pypi.python.org/pypi/openaustralia|https://pypi.org/project/openaustralia/|g' www/docs/api/index.php
sed -i 's|http://theyworkforyou.com/api|https://www.theyworkforyou.com/api/|g' www/docs/api/index.php
sed -i 's|https://groups.google.com/group/openaustralia-dev|https://groups.google.com/g/openaustralia-dev|g' www/docs/api/index.php
sed -i 's|http://code.google.com/p/poli-press/|https://code.google.com/archive/p/poli-press|g' www/docs/api/index.php www/docs/news/editme.php
sed -i 's|https://www.wordpress.org/|https://wordpress.org/|g' www/docs/api/index.php www/docs/news/editme.php
# BROKEN http://parl.stand.org.uk/cgi-bin/moin.cgi/DataSchema (error) in files: www/docs/debate/index.php
sed -i 's|http://www.openaustralia.org/debates/?d=$1|https://www.openaustralia.org.au/debates/?d=$1|g' www/docs/gadget/cal.php
# BROKEN http://www.google.co.uk/politics/ (404) in files: www/docs/gadget/index.php
sed -i 's|http://www.google.co.uk/ig/adde?moduleurl=http://www.openaustralia.org/gadget/twfy.xml|https://www.google.com/|g' www/docs/gadget/index.php
# BROKEN http://www.google.co.uk/politics/images/add.gif (404) in files: www/docs/gadget/index.php
# BROKEN http://www.publications.parliament.uk/pa/cm200506/cmhansrd/cm060606/index/60606-x.htm (403) in files: www/docs/hansardbugs/index.php
# BROKEN http://www.publications.parliament.uk/pa/cm200506/cmhansrd/cm060605/text/60605w0605.htm (403) in files: www/docs/hansardbugs/index.php
# BROKEN http://www.publications.parliament.uk/pa/cm200506/cmhansrd/cm060605/text/60605w0607.htm (403) in files: www/docs/hansardbugs/index.php
# BROKEN http://www.publications.parliament.uk/pa/cm200506/cmhansrd/cm060605/text/60605w0638.htm (403) in files: www/docs/hansardbugs/index.php
# BROKEN http://www.publications.parliament.uk/pa/cm200506/cmhansrd/cm060605/text/60605w0673.htm (403) in files: www/docs/hansardbugs/index.php
# BROKEN http://www.publications.parliament.uk/pa/cm200506/cmhansrd/cm060703/text/60703w1405.htm (403) in files: www/docs/hansardbugs/index.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions