Ran into a really bizarre situation today with loading URLs from inside a Word document. Microsoft Office apparently does some stupid junk with pre-loading the URLs inside Office and will follow URLs straight to logout page instead of passing it to the browser untouched like a normal application would. I managed to fix this in Apache by basically telling MS Office to have an HTTP 200 code anytime it attempts to access the server. Below is the configuration block for that.
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*ms.*office.*$ RewriteRule .* - [R=200,L]