Make a WordPress site work on both HTTP & HTTPS

4 Responses

  1. Leo says:

    it seems to work fine for me on wp 4.1.1.

    I noticed simply changing

    to

    seems to make your snipped work without hard coding the site name. is there anything wrong with this approach?

    thank you.

    • Rabin says:

      Thank you, I’m aware of this option, and yes it dose make the code more generic. But the $_SERVER[‘HTTP_HOST’] variable is based on the request from the client, and so can be unexpected, this is why i hard coded the site name.

  2. Till says:

    Any news on the Cache plugin?

Leave a Reply

Your email address will not be published. Required fields are marked *