Redirect to login page when directly accessing media url
-
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 inIs there a way to do this?
Thank you for your help!
Best, Patrick
Viewing 2 replies - 1 through 2 (of 2 total)
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.