上午使用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