Hi. I've protected a folder: http://www.mysite.com/secure I have a php script for uploading images and audio files to my protected folder and subdirectories. I would like those images to be visible and accessible on an index page in the root of my site (http://www.mysite.com) for all visitors to see, including those who have not yet logged in/signed up. Is there any way I can exclude images from being protected, although they are in a protected folder? If so, how do I do this? What file do I need to edit? I've been searching the forum and I've found no clue on how to do this. Any help would be fantastic!
You can do this in .htaccess if you will add rewrite rule for each file that should not be protected. Create separate folder for images and files that should not be protected and upload these files and images to new folder. This will be more easy.
Here is example. If you have image test.jpg inside protected area and what to remove protection for this image change protection code in .htaccess this way: Code: ########### AMEMBER START ##################### Options +FollowSymLinks RewriteEngine On ## allow access for any active subscription RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+) RewriteCond /home/alexander/htdocs/PRO-3_0/data/new_rewrite/%1 -f. RewriteRule ^(.*)$ - [L] #### Rules that should be added RewriteCond %{REQUEST_URI} test.jpg$ RewriteRule ^(.*)$ - [L] #### ## if user is not authorized, redirect to login page # BrowserMatch "MSIE" force-no-vary RewriteCond %{QUERY_STRING} (.+) RewriteRule ^(.*)$ http://localhost/PRO-3_0/plugins/protect/new_rewrite/login.php?v=-any&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R] RewriteRule ^(.*)$ http://localhost/PRO-3_0/plugins/protect/new_rewrite/login.php?v=-any&url=%{REQUEST_URI} [L,R] ########### AMEMBER FINISH ####################
RewriteCond %{REQUEST_URI} test.jpg$ This will exclude test.jpg. What can be used to exclude all jpg? David