documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Dead links all over the web - suggestion

Open yeya opened this issue 1 year ago • 10 comments
trafficstars

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.

yeya avatar Feb 08 '24 09:02 yeya

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

jcolp avatar Feb 08 '24 09:02 jcolp

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

yeya avatar Feb 08 '24 10:02 yeya

I'll do some digging next week.

gtjoseph avatar Feb 16 '24 19:02 gtjoseph

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.

gtjoseph avatar Feb 22 '24 20:02 gtjoseph

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 avatar Feb 24 '24 22:02 yeya

Another dead link with no 404

https://wiki.asterisk.org/wiki/display/AST/Queue+Logs https://docs.asterisk.org/Operation/Logging/Queue-Logs/

yeya avatar Mar 20 '24 09:03 yeya

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 avatar Mar 20 '24 22:03 gtjoseph

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.

gtjoseph avatar Mar 21 '24 13:03 gtjoseph

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.

yeya avatar Mar 21 '24 15:03 yeya

I'll test out the search share thing.

gtjoseph avatar Mar 21 '24 15:03 gtjoseph