sorry but it’s impossible to use this plugin due to i got a lot of internal links. I need a function so in every case it follow the final slash.
You could use “the_content” filter to parse through all content upon output, looking for links without a trailing slash and adding one as needed. It’s pretty inefficient to do this for any post or page request, doing the same thing over and over again. Why not permanently correct the URLs as they sit in the DB?
The better search replace plugin previously referenced may not have the power to properly do this, but the plugin is based on the tool from interconnect/it. This tool is much more powerful because it supports regexp search patterns. I recommend you use it to permanently correct all of your internal URLs. This does require some regexp knowledge. If you don’t know regexp, it’s not that hard to learn just enough to do the job.
You can try out your regexp pattern by using the dry run option where no actual changes are made, but you can still see the results of your regexp replacement. There are also several websites that let your try out a regexp pattern on sample data. regexr.com is one example. It also has resources that help you learn regexp and better understand what the various regexp tokens do.
thanks for your reply, but it’s so difficult to use regex pattern for my case.
I need to check where inside href there is sitename with www. not www, with https, without https, now i’m trying to remove the sitename from all links, so they will be only relative /pippo/…..