Our users are trying to embed links to our site http://www.newsfixed.com/ in Word documents, and they are failing. Word for Mac seems to be very sensitive to server configuration and sometimes fails to load certain links. The same problem seems to happen for links to http://www.facebook.com/ and http://www.pinterest.com/ (but links to google, twitter, instagram etc are fine)
Steps to reproduce:
- Create a new Word for Mac document
-
Type the following URLs into the document, and let Word turn them into hyperlinks:
http://www.google.com/
http://www.facebook.com/
http://www.theguardian.com/
http://www.nytimes.com/
http://www.pinterest.com/
http://www.instagram.com/
http://www.twitter.com/ -
Click on the links — you will see that Google, the Guardian, New York Times, Instagram and Twitter will work, but Facebook and Pinterest (and my site www.newsfixed.com) will not. Word reports an error, "Unable to open http://www.pinterest.com/. Cannot locate the Internet server or proxy server.":
It could somehow be related to https://stackoverflow.com/questions/17926225/microsoft-office-hyperlink-issues but I'm not sure how!
From looking at pinterest.com's HTTP response it seemed that it might be to do with serving a 302 temporary redirect to an HTTPS version rather than a 301 – which both my site and pinterest had in common. So I changed my server config and now return 301s, but it doesn't seem to make any difference.
I'm on an old version of Word for Mac — 12.3.6. I've had reports that it also happens on newer versions of Word (but no version numbers, sorry). Apparently it's only started happening in the past week, could it have something to do with the SSL handshake and Heartbleed patches perhaps? (I of course regenerated my certificate this week)
The server is standard Apache 2.4 on Ubuntu, running Django app via mod_wsgi.
Thanks for any help,
Brendan.
Best Answer
Well, I managed to get it working...
It seems that Word doesn't like my SSL certificate (from RapidSSL/GeoTrust), even though it passes all checks on SSL checker sites (digicert sslshopper and more).
So I realised I would have to catch the Word user agent in my Apache HTTPD config:
where "msoffice-redirect.sh" is a simple Bash CGI script (!) performing a meta refresh to the secure page:
So the flow is:
Yes it's a complete hack. I feel dirty. But it works. All the links in Word documents must be http:// though, https:// links fail, but at least we can include some links in our Word docs now.
I was inspired by the "fix Microsoft links" Ruby app which does the same thing in a Ruby server.
I hope this helps somebody avoid the pain I've gone through this weekend!