• AfsalMe

    (@lasano)


    I have restricted hotlinking my files in wordpress upload folder using htaccess. But I need those files to be displayed in Google Doc Viewer.
    In htaccess I allow Google Docs to hotlink my files, but it is not working. Please help me in this
    Below is the code I used in my htaccess file
    _______________________________________________
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^https://(www\.)?mydomainname.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?docs.google.com [NC]
    RewriteCond %{REQUEST_URI} !hotlink\.(gif|png|jpg|doc|ppt|xls|pdf|html|htm|xlsx|docx|pptx|swf) [NC]
    RewriteRule .*\.(gif|png|jpg|doc|ppt|xls|pdf|html|htm|xlsx|docx|pptx|swf)$ https://mydomainname.com/ [NC]
    ____________________________________________________

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to allow Google Doc to display hotlinked files?’ is closed to new replies.