• Resolved swahlgren

    (@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=”https://domain.com&lt;?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=”https://domain.com/URL/Path&#8221; hreflang=”x-default” />

    But what I get is:

    <link rel=”alternate” href=”//domain.com/URL/Path” 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?

    https://www.ads-software.com/plugins/wp-hydra/

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

    (@tyxla)

    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.

    Thanks,
    Marin

    Thread Starter swahlgren

    (@swahlgren)

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

    Plugin Author Marin Atanasov

    (@tyxla)

    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.