@artus2000 Can you clarify your question a little bit: How do you want to restrict access to the attachments?
Sure. When your plugin is enabled, access to the post and pages are restricted. But when someone have direct link to the attachment ex: “www.mydomain.com/wp-content/uploads/2020/01/myattachment.jpg” then access for this file is still possible.
Thats why I am asking if it is possible to restrict access for direct attachment for non logged in users?
I think I found a solution here: stackexchange.com
But it would be amazing if you could incorporate that or similar solution into your plugin. Thanks for your time.
Glad that you found the solution!
For your question:
Short answer: No, RSA doesn’t support restrict the direct access to attachment.
Long answer: Restricted Site Access hooks to parse_request
to limit access to your site to visitors, so it won’t have any control over the direct link of the attachment which is processed directly by your webserver.
Hope that helps! I’m marking this top as resolve. If you have any other question, please open a new topic, we’re happy to help!
-
This reply was modified 4 years, 2 months ago by Tung Du.