Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter marcusrieche82

    (@marcusrieche82)

    It is a Personal Blog. Family habe access and clone friends. So no advanced role management needed. But protecting family Photos is important. So this in .htaccess seems to Do the Job

    # require login for media files
    # more info: https://m0n.co/11
    <IfModule mod_rewrite.c>
    	RewriteCond %{REQUEST_FILENAME} (.*)
    	RewriteCond %{HTTP_COOKIE} !wordpress_logged_in_([a-zA-Z0-9_]*) [NC]
    	RewriteRule .* - [F,L]
    </IfModule>

    Fonds here https://htaccessbook.com/require-login-access-wordpress-media-files/

    Thank you for your reply.

    Thread Starter marcusrieche82

    (@marcusrieche82)

    The browser cache fooled me once or twice. I checked if my changes had any effect by using an anonymous new browser window. I am using an administrative user.
    But I ended up in the above situation.

    Thread Starter marcusrieche82

    (@marcusrieche82)

    All Images are in the same upload folder organized in sub folders by year and month. So yes the new pictures are in the 2021 folder with subfolders per month. Older pictures are therefore in 2019, 2018,… but all have the same upload root where the .htaccess is located.
    I tried turning it off and on again. So the .htaccess would be recreated. I tried using the custom option and used an example from the forum here.
    I checked file permissions, but I still have no clou why ../2017/04/DSM12345.jpeg can be shown and ../2021/02/DSM56789.jpeg not.

    While switching on and off the file protection I was able to get some new pictures shown. Maybe it was some more switching. But pictures uploaded after that are still not shown. So 2021 is not broken in general. But these pictures are located in different month folders below that.

    How should .htaccess look like?

Viewing 3 replies - 1 through 3 (of 3 total)