I have a website with many pages, a custom php website. The site works with a database that is growing all the time (with a php code that i dont write, so messing with that code is not my first choice)
I am looking for a method (maybe using DOM inside the same page content?) to detect every link and add a rel nofollow to the ones that direct to other sites, i only want to have follow in my internal links (that direct to my own site).
I want to do it for Google, so javascript, etc. does not works for me.
To be very clear, i want that my code checks all my links in that webpage (the same with the code), before displaying it contents, and add the rel=nofollow to outgoing links.
It is possible? Maybe using REGEX or DOM.
Thanks in advance