.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.

  1. maintain table map keyword(unique) , actual filename.

  2. provide link points controller method parameter keyword of file (do not explicitly display filename).

  3. read file per mapping , change filename random key (eg. session id) , provide download.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -