.htaccess - Where downloads folder should be placed in CodeIgniter -
where should place downloads files? these should not accessible public. should accessible registered users. my directory structure follows. -application -system -downloads ---abc.7z -index.php as can seen downloads directly accessible user through following. 127.0.0.1/ci/downloads/abc.7z but make restricted added .htaccess following directive deny all its protected public access cannot access views doing earlier mentioned below. <a href="<?php echo base_url().'/downloads/abc.7z' ?>">click here download</a> to make file available download registered users, can hide actual filename user. maintain table map keyword(unique) , actual filename. provide link points controller method parameter keyword of file (do not explicitly display filename). read file per mapping , change filename random key (eg. session id) , provide download.