Welcome Guest, Not a member yet? Register   Sign In
how do i get to restrict access to my folders
#1

[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




Theme © iAndrew 2016 - Forum software by © MyBB