My whole site is HTTPS, and I have trouble linking to a tumblr blog. If I use a protocol agnostic link (href="//...") the browser tries to access the tumblr blog via https, which throws an error (connection refused). Of course if I link to the http version of the site I get a "mixed content" warning in the browser. Is there any way to link to an http resource and avoid the mixed content warning? Or am I doing something wrong?
1 Answers
This may be a little more complicated, but if Tumblr doesn't provide an SSL-secured URL you can use, you could set up a proxy site like https://mytumblrproxy.example.com which you run on your server and which proxies all requests to/from your Tumblr blog and then link to that.
Be sure you don't violate their terms of service, and also, I'd suggest implementing some sort of caching of the content that gets retrieved so that Tumblr doesn't get too many requests from your server's IP and isn't more likely to block you because of it.
If your needs are simple and using mod_proxy
and mod_cache
are more complex than is worth it for you, you could set up that subdomain as mentioned and then just have a PHP script on it which fetches what you need via cURL.
- 1,308
- 2
- 17
- 42
-
Thanks. That's too complicated for me, but seems to be the right (and only) answer nonetheless! – mrtnmgs Jul 22 '15 at 17:34
-
@sa289 - Yep, you're right. I removed the dumb comment. – user2320464 Jul 23 '15 at 03:16
-
@user2320464 haha - no worries – sa289 Jul 23 '15 at 05:34