上午使用codeigniter来建立一个网站,有很多图片库,我将图片存储在文件夹中,但我想限制通过URL访问文件夹.ie我不'不想人在使用这样的网址::我如何限制访问我的文件夹
所有图像是包含图像文件夹中的文件夹来访问我的图像文件夹..我试图用一个htaccess
文件
<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>
index.php w的重写条件orks很好,但我仍然可以通过url访问我所有的文件夹
@BrandonS和@luci tnks很多 – 2011-04-13 15:23:21