Support » Plugin: WP Hydra » Protocol is stripped from header

  • Resolved swahlgren


    I’m running a website across multiple domains and I suspect WP Hydra might be the source of an issue I’m having

    I have the following script in header.php with the intent of creating a hreflang tag:

    <link rel=”alternate” href=”;?php echo parse_url($_SERVER[‘REQUEST_URI’],PHP_URL_PATH); ?>” hreflang=”x-default” />

    The idea is to return something like this:

    <link rel=”alternate” href=”; hreflang=”x-default” />

    But what I get is:

    <link rel=”alternate” href=”//” hreflang=”x’-default” />

    As you can see, the “https:” part has been left out but I need it for the hreflang tag. Any suggestions as to what’s happening?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Marin Atanasov


    Hello @swahlgren,

    It does not make sense for WP Hydra to remove your protocols at all. The plugin does not modify the protocol at all.

    The code you supplied works fine for me and does not remove the protocol.
    It appears that the issue you’re having is caused by another plugin.

    Good luck fixing your issue.


    Thread Starter swahlgren


    It was a Cloudflare plugin, your plugin hasn’t let me down yet! 🙂

    Plugin Author Marin Atanasov


    This is good news 🙂 Glad you were able to locate the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Protocol is stripped from header’ is closed to new replies.