Please help me to avoid direct access when we enter the path to file/image..
Asked
Active
Viewed 848 times
1
-
What exactly is your problem? – Ja͢ck Aug 31 '12 at 11:47
-
you can validate a file to download only when someone is login to your website. – Gaurav Aug 31 '12 at 11:51
-
user can download only when they signin. – user1638546 Aug 31 '12 at 12:06
-
http://stackoverflow.com/questions/10596116/caching-http-responses-when-they-are-dynamically-created-by-php/10596231#10596231 – Ja͢ck Aug 31 '12 at 12:23
3 Answers
0
You can set Directory listing to false for the folder you want to protect from direct access. In your hosting panel there is a option to set this Parameter.

Abhishek
- 101
- 1
- 3
0
If you are using cPanel, use "Hotlink Protection". Hotlink protection prevents other websites from directly linking to files on your website. You can block direct access by specifying extensions. You can add jpg, png, gif,etc. for this problem.
Here is the tutorial.

Mansoorkhan Cherupuzha
- 1,761
- 1
- 24
- 45