I theory this could be coded, but it is effectively a broken link checker.
One way would be to ‘register’ the link rather than just using a link, either with a custom shortcode or block. Once ‘registered’ two things could happen
1. a periodic ( e.g. daily ) scan of links to see if they 404
2. when the link is 404’d the when used it is replaced the new ‘target’
e.g. [my_link external_target=”example.com” internal_target=”/mypage” ]
There are other ways of coding it too, such as a forwarder endpoint, or javascript which on click of a link , if external, could fetch the remote page check status and then apply a redirect although this would be difficult to redirect to different pages, easier if just redirect to one page.
Of course such a solution is way outside the scope of this free plugin and the volunteer support provided here.
Hi @alanfuller,
Yes, your way is awesome, but since I don’t have much experience, I guess I would have to wait or hire someone to create such a custom plugin.
But still, if in the future you could create such a plugin, please do let me know, I will be the 1st person to use your plugin. Also, there are many websites that have a model like mine, and will be glad to have such a plugin with them.
But thank you for the idea, I will try it out.
Good luck.
I one day I have time ( ha ha ) I might just build that plugin too.
I’ll let you know if I do.
Hi @alanfuller,
Thank you for considering.
Hope so that one day magically you will have a day off to give a thought to this plugin (hee hee, just kidding). 😂
Thanks again, enjoyed talking to you.
You are the best!
Cheers!