i need to rewrite the url path of my href internal links. I got into my site relative and absolute links.
<a href="https://www.sitename.com/pippo" <a href="/pippo" <a href="/pippo/"
I need a php function to insert inside child theme that check if an href is internal links and check the last char of url path and then if there isn't as last char the '/' apply it to internal links.
Only inside the posts and pages.
This to avoid the huge 301 redirection quantity.
Thanks for your support.