Skip to content

Write some JavaScript to handle redirects on the 404 page #16

Description

@adamvoss

For example links such as http://gpodder.org/changelog/3.9.3 are common on the blog and are currently still handled by the gpodder.org server.

The complete list of redirects can be seen in redirects.conf.

If whatever server is providing gpodder.org is truly to go away, I assume a solution needs to be found for these links. Am I correct that this is a goal?

Activity

  1. thp commented on Jul 9, 2017

    @thp
    Member

    Yeah, the server isn't going away quickly, but we eventually need to handle those (I'd also be okay with dropping those redirects or replacing them with something else [some JavaScript in the 404 page that handles the redirect by parsing and matching the URL?], not sure how dynamic this can be).

  2. adamvoss commented on Jul 9, 2017

    @adamvoss
    ContributorAuthor

    HTTP redirects are not available with GitHub Pages, as you are familiar with from the podcastparser and mygpoclient pages.
    HTML redirects (meta refresh) can be done (ref podcastparser/mygpoclient) as can JavaScript.

    With Jekyll, (and the current state of things) to use meta refresh we would need a file for every target making it rather impractical for some of the redirects (such as commit/$sha1). Thus we will need to go with the 404 and JavaScript route. We should be able to access the full requested URL from the JavaScript so will be able to be dynamic as we need to be. The down-side is that it won't be as friendly to search engines, but I don't see that as much of an issue for the links that are affected.

  3. changed the title [-]Do other redirects need to be handled by this repository?[/-] [+]Write some JavaScript to handle redirects on the 404 page[/+] on Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions