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

Dead links all over the web - suggestion #52

Open
yeya opened this issue Feb 8, 2024 · 10 comments
Open

Dead links all over the web - suggestion #52

yeya opened this issue Feb 8, 2024 · 10 comments

Comments

@yeya
Copy link

yeya commented Feb 8, 2024

Like mentioned in #18 , There are too many dead links out in the web.

Most of the links to the old documentation in community.asterisk.org and stackoverflow.

In case there is no easy fix - I would like to suggest to try handling 404 a bit better than current.

Instead of redirecting to homepage, you should:

  1. Display a not found message, maybe with suggestion to perform a search
  2. Log and count 404 requests per URL at server side, so someone could manually add redirects. At least for the most common links.
@jcolp
Copy link
Member

jcolp commented Feb 8, 2024

Regarding logging the documentation site is on GitHub Pages. We don't control the server side, or have access to it.

@yeya
Copy link
Author

yeya commented Feb 8, 2024

Maybe GitHub Traffic Insights could help?

If not, we can use Google analytics or similar.

I think the redirect to HomePage instead of 404 need to be fixed first.

You do have 404, but it is skipped when the link is going to the old wiki, for example:
wiki.asterisk.org link - Redirected to unknown
docs.asterisk.org link - Goes to 404

@gtjoseph
Copy link
Member

I'll do some digging next week.

@gtjoseph
Copy link
Member

I can't find any way to log requests, 404 or otherwise, but I did add a perpetual issue for reporting dead links and created a 404 landing page which has instructions for searching and reporting dead links. I think this is all we can do for now.

@yeya
Copy link
Author

yeya commented Feb 24, 2024

That is great!
But...
Most of the dead links are wiki.asterisk.org links.
All this requests are getting a 301 redirect from some nginx server to https://wiki.asterisk.org instead of the full relative link.
So the disappointed visitors will not see the new 404 page.

See the example above: https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Application_ToneScan

P.S If you can get control of the nginx server, you can get all the frequent missed pages, and maybe even fixing the redirects there, without GitHub pages help.

@yeya
Copy link
Author

yeya commented Mar 20, 2024

@gtjoseph
Copy link
Member

I fixed the 404 issue so you should now see a page that looks like...

image

For API documentation that was auto-generated, I may be able to create some re-write rules but for the static pages, there's just no good way to map them. One thought I had was to rewrite requests for static pages to a site-specific google search so a request for
/wiki/display/AST/Getting+A+Backtrace would become
https://www.google.com/search&q=site%3Adocs.asterisk.org+Getting+a+Backtrace. I'm not sure that's helping though.

@gtjoseph
Copy link
Member

I've implemented the redirects for the auto-generated API documentation so a request for
/wiki/display/AST/Asterisk+18+ManagerAction_Hangup will redirect to /Asterisk_18_Documentation/API_Documentation/AMI_Actions/Hangup on the new site.

For asterisk versions that are no longer supported, the redirect will go to Latest_API.

@yeya
Copy link
Author

yeya commented Mar 21, 2024

Great! Thanks!
The 404 is much better than the home page, thanks for this too. At least you can see the link, and copy and paste to the search inbox.
Maybe there is a way to use the share search option to redirect directly to a search page? I think most of the dead link will find the correct page.

@gtjoseph
Copy link
Member

I'll test out the search share thing.

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

3 participants