Private! WordPress Access Control Manager
[resolved] How to block direct image links (4 posts)

  1. Shinichi Nishikawa
    Posted 5 years ago #

    Hi X-Blogs,

    Thank you for this plugin!

    I want to know how to block the direct access to the image urls.
    I can block accesses to the blogs like http://001.example.com/ but direct link (like http://001.example.com/files/2011/05/sample-img.jpg) is still visible to everyone and I want to control it.

    Is it possible??

    I want to make a private diary site and it's neccesary..


  2. s_ha_dum
    Posted 5 years ago #

    I think you could probably do it. It is going to be somewhat tricky though because if you look at the http requests a user's browser actually makes, the images are loaded from http://001.example.com/files/2011/05/sample-img.jpg however it might look superficially. Run the FF AddOn HttpFox on your page and you'll see what I mean.

  3. Shinichi Nishikawa
    Posted 5 years ago #

    Thank you apljdi,

    I still don't know how to get it inaccessible.

    I put .htaccess file in the blogs.dir folder which goes like below.

    SetEnvIf Referer "^http://*\.example\.com" ref_ok
    order deny,allow
    deny from all
    Allow from env=ref_ok

    It works well when I type http://example.com/wp-content/blogs.dir/2/files/2011/05/sample-img.jpg directly in the browser or linkig the img from another website. It rejects the access from all referer except example.com, the domain the wordpress is actually installed.

    The problem is it's still visible when typing http://001.example.com/files/2011/05/sample-img.jpg in any case.

  4. Shinichi Nishikawa
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Private! WordPress Access Control Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic