how do i get to restrict access to my folders |
[eluser]ebuoe[/eluser]
hello ... am building a website with a lot of image galleries , i store the images in folders ,but i want to restrict access to the folders via url .i.e i don't want people to have access to my image folder using a url like this:: http://website/all_images/ all images is the folder that contains the image folder .. i tried using a htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^CI_system.* RewriteRule ^(.*)$ /website/index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index\.php|all_images) RewriteRule ^(.*)$ /website/index.php?/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /index.php </IfModule> the rewrite condition for the index.php works well but i still get access to all my folders via the url
[eluser]InsiteFX[/eluser]
Code: // Read and write for owner, nothing for everybody else You can also do this with an FTP Program! InsiteFX
[eluser]ebuoe[/eluser]
thanks culdn't figure out a way to apply your method ... i put index.php files in all the image folders but i will still find a way to implement yours it seems more efficient to you |
Welcome Guest, Not a member yet? Register Sign In |