[Mediawiki-l] protect images and pdfs

Poornima Pochana ppreddy at uab.edu
Sat May 5 20:28:00 UTC 2012

Hi Bernhard,

I faced the same issue trying to protect images and pdfs. In my case, the entire wiki was private. but the urls to images and pdfs (if one knew) were accessible to all. I tried many methods, but these two Location directives in the apache virtual host config for my wiki solved the issue for me.

<Location "/<mywikiname>/Main_Page">
                AuthType Basic
                Require valid-user
<Location "/<mywikiname>/images">
                AuthType Basic
                AuthGroupFile /path/to/mywiki-groups
                Require group <mygroup>

Hope this helps.


From: mediawiki-l-bounces at lists.wikimedia.org [mediawiki-l-bounces at lists.wikimedia.org] on behalf of Scheid, Bernhard [Bernhard.Scheid at oeaw.ac.at]
Sent: Saturday, May 05, 2012 9:31 AM
To: mediawiki-l at lists.wikimedia.org
Subject: [Mediawiki-l] protect images and pdfs

I am running a semi-public Wiki where some pages are reserved for internal use (basically for copy-right reasons). While I can restrict access to the respective wiki articles (using user groups and user rights), the same seems not possible for pure image links (addressing the image, not the file page) or pdf-links respectively. Is there a way to prohibit access to images and pdfs either?

MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org

More information about the MediaWiki-l mailing list