• hi guys,

    we’re working on a new site with UAM. protection of selected posts is working. but: i can’t get the file portection to work no way. any ideas?

    details:
    page protectio is ok, actually there is a force login sitewide in front.

    https://hst2023371279.hst2.ncsrv.de/studio-life/medien/
    the file hst2023371279.hst2.ncsrv.de/wp-content/uploads/test.mp4 should be protected, but is not.

    linking site is protected and working. setup:
    /wp-admin/admin.php?page=uam_settings&tab_group=file
    lock files yes
    download type normal (checked fopen as well, same result)
    inline file types mp4
    custom file handling no
    locked file types all (checked mp4 as well, same result)

    htacces /wp-content/uploads/

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_URI} !.*\/sites\/[0-9]+\/.*
    RewriteRule ^([^?]*)$ /index.php?uamfiletype=attachment&uamgetfile=$1 [QSA,L]
    RewriteRule ^(.*)\?(((?!uamfiletype).)*)$ /index.php?uamfiletype=attachment&uamgetfile=$1&$2 [QSA,L]
    RewriteRule ^(.*)\?(.*)$ /index.php?uamgetfile=$1&$2 [QSA,L]
    </IfModule>

    any idea how to get the files attached to the post protected as well?
    it’s a standard unix server.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author GM_Alex

    (@gm_alex)

    Hi @ffwebdesigner,

    I made a clean test instance and tested the file protection. Everything for me seem to work. The only thing I can see is that you htaccess file ist missing the <IfModule mod_rewirte.c> line. It should look like the following:

    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_URI} !.*\/sites\/[0-9]+\/.*
    RewriteCond %{REQUEST_URI} ^.*/[0-9]{4}/[0-9]{2}.*$
    RewriteRule ^([^?]*)$ /index.php?uamfiletype=attachment&uamgetfile=$1 [QSA,L]
    RewriteRule ^(.*)\?(((?!uamfiletype).)*)$ /index.php?uamfiletype=attachment&uamgetfile=$1&$2 [QSA,L]
    RewriteRule ^(.*)\?(.*)$ /index.php?uamgetfile=$1&$2 [QSA,L]
    </IfModule>

    `

    Thread Starter ffwebdesigner

    (@ffwebdesigner)

    hi alex,

    just forgot to copy that line, thanks. interested in checking / fixing the issue for money? your hp is offline, please send contact details if interestested.

    cheers
    frank

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘file protection not working’ is closed to new replies.