Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adamvoss opened this issue Jul 6, 2017 · 2 comments
Open

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

adamvoss opened this issue Jul 6, 2017 · 2 comments

Comments

@adamvoss
Copy link
Contributor

adamvoss commented Jul 6, 2017

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?

@thp
Copy link
Member

thp commented Jul 9, 2017

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).

@adamvoss
Copy link
Contributor Author

adamvoss commented Jul 9, 2017

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.

@adamvoss adamvoss changed the title Do other redirects need to be handled by this repository? Write some JavaScript to handle redirects on the 404 page Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants