0

I work with a PHP based CMS and it automatically creates various links, in various locations, to a certain webpage I created with it.

I don't want links to this particular webpage to exist anywhere.
I do plan to visit and edit that webpage from a bookmark in my web browser, but I just don't want any link to it to be available from inside the website.

I need a bulk way to prevent formation of all links to that particular webpage in any HTML source code created by PHP;
an ugly "don't do some of what you're supposed to do" solution, if you will.

Is there any PHP internal function to prevent creation of any such (link) HTML content that would otherwise be created?

1 Answers1

0

You could try to retrieve the final HTML with the AfterFinalPageOutput hook, and then do some regex replace (which is inadvisable in general but maybe in your case the links have easy-to-predict markup).

  • If I understand correctly the retrieving (and then - regex replace) is done just one stage before the actual parsing of HTML? I mean to ask if the DOM is created once or twice (per what the Google crawler gets)? –  Aug 03 '19 at 16:03