• Resolved pbaumann

    (@pbaumann)


    Hi,

    I have protected files visible only for logged-in users which is working fine, except when trying to access the direct link of the file in the uploads folder.

    I am using direct links to the media files created by another plugin (WooCommerce Product Documents).

    When a user clicks on that link he’s redirected to the direct URL of the file in the uploads folder (which is what I want) but it shows the 404 error page (which I don’t want).

    What I want is:

    – redirect the user to the file download when logged in
    – redirect the user to the login/signup page when not logged in

    Is there a way to do this?

    Thank you for your help!

    Best, Patrick

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi Patrick, for testing purposes can you try the following. Add a media file from WordPress Media -> Library. Then carry out a test. Let me know what happens.

    Thank you

    Thread Starter pbaumann

    (@pbaumann)

    Hi, thank you for your reply. I found out that it only happens with one specific file. I don’t why, but I guess it’s caused by another plugin that I had installed before. With newly uploaded files it doesn’t happen. Thank you anyway!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirect to login page when directly accessing media url’ is closed to new replies.