![]() You can then copy that private download link to clipboard and subsequently paste it on your browsers and/or email by clicking on the Copy URL button. Once a WordPress file is protected, Prevent Direct Access will automatically generate a private download link containing a random string for you to access or share this private file with others. Users will have to log into your site in order to access these protected files. Instead of redirecting unauthorized users to the 404 page, you can show them a custom page, e.g registration or login page. You can protect unlimited file uploads with our PDA Lite alone. ![]() Unwanted users will be redirected to your 404 not found page when attempting to read and download these file URLs. Once protected, only admin users and the file’s author can access them directly. Prevent Direct Access is designed to protect all your WordPress media files such as images (PNG, JPEG), documents (PDF, DOCX, PPTX), audios, and videos (MP4, MP3) that you upload to your website under Media Library or via Media, Pages or Posts. Our PDA Lite version offers the following features: Protect Unlimited WordPress Media Library File Uploads An Inside Look at Prevent Direct Access (PDA) Gold You’ll be able to protect your private files in no time. We’ve created an intuitive user interface directly in your Media Library. You currently appear to have a mixture of both.Prevent Direct Access (PDA) offers a simple solution to protect your WordPress files as well as prevent Google, other search engines and unwanted users from indexing and stealing your hard-to-produce ebooks, documents, and videos. htaccess file in the /wp subdirectory ensures it does not rewrite requests that already contain /wp.) The first rule you posted rewrites requests to the /wp subdirectory for any request where it is omitted. some containing the /wp subdirectory and some (your static assets) not. wp/wp-contents/uploads/image.jpg.Īlthough this would imply you have a mismatch of URLs. However, since I installed Wordpress in a subdirectory, the image path actually is. The dl-file.php script should then be in the root of the WordPress installation, not in the document root. htaccess file are not even processed, since mod_rewrite directives are not inherited by default. htaccess file are completely overridden by the mod_rewrite directives in /wp/.htaccess (by default). You should be adding the above rule to the /wp/.htaccess file, not the one in the root. htaccess file in the /wp subdirectory that contains the main WordPress directives (ie. RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 htaccess (above the previous rewrite rule): I have added the following rewrite rule to my. Any ideas how to ensure that images are no longer accessible for non logged-in users would be much appreciated. I have tried adding 'wp' to a rewrite rule, like: RewriteRule ^wp/wp-content/uploads/(.*)$ dl-file.php?file=$1 īut to no success. I am not being redirected to the log-in page. When I am not logged in and try to access an image with this path, the image opens normally. However, since I installed Wordpress in a subdirectory, the image path actually is './wp/wp-contents/uploads/image.jpg'. When I am logged in and I try to access an image with a path like './wp-contents/uploads/image.jpg', I get redirected to the log-in page. htaccess (above the previous rewrite rule): RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 Now, I want to only allow logged in users to be able to access the 'wp-content/uploads/' folder. RewriteCond % ^(RewriteRule ^(.*)$ /wp/$1 ![]() I am using the following rewrite rule to direct all urls to this subdirectory. ![]() ![]() I have installed Wordpress in a subdirectory of a subdomain. ![]()
0 Comments
Leave a Reply. |