Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    They are because WP acts as an oEmbed server. When someone links to your site, if their site is oEmbed enabled, their server makes an /embed/ request and your site returns content appropriate for an embed preview card.

    /embed/ requests are handled by rewrite rules. The related rules would need to be removed to prevent such requests from being properly fulfilled, but it doesn’t actually disable the oEmbed server. Internally, WP will still think such links are viable, except now it’ll never get the /embed/ requests intended for it.

    AFAIK there is no mechanism to remove rules once added, I think you’d need to directly hack the global $wp_rewrite array to remove them. It’s probably easier to add a .htaccess directive to reject such requests before WP ever sees them.

    It’s possible there’s a far easier way, such as by defining a certain constant. I’ve been unable to find any such reference. Since it’s been over 3 days with no response here, I thought giving you what I do know is better than nothing.

    Not that it really matters, but why are you finding /embed/ links objectionable? Inquiring minds want to know ??

Viewing 1 replies (of 1 total)
  • The topic ‘How to disable subpages with “embed” slug’ is closed to new replies.