Mayuresh Kasture
New Member
- Messages
- 11
- Reaction score
- 0
- Points
- 0
cPanel user name: mayuresh
Domain: mayureshkasture.com
Hosting Package: ad-free hosting
Hi,
I have two queries,
1. How to prevent direct access to files from my public folder.
Say I have a folder called "A" in the "public_html" folder and A contains file called "B.pdf". I want this file to be accessed only through the links that I provide on my website. If somebody tries to access "http://mayureshkasture.com/A/B.pdf", he should not be allowed to do that. I am aware of hotlink protection and I tried that. But when I put "pdf" into the list of extensions to be protected against direct access, links form my website to a pdf document also stopped working. As in they started opening a blank pdf document. (I am using Mozilla Firefox 3).
2. How do I restrict directory listing?
Say I have a folder called "A" in the "public_html" folder and A contains file called "B.pdf". If somebody accesses "http://mayureshkasture.com/A", he will get the list of files in that folder (B.pdf in this case). I want to restrict this listing.
Could you please answer both my queries?
Thanks in advance,
Mayuresh
Domain: mayureshkasture.com
Hosting Package: ad-free hosting
Hi,
I have two queries,
1. How to prevent direct access to files from my public folder.
Say I have a folder called "A" in the "public_html" folder and A contains file called "B.pdf". I want this file to be accessed only through the links that I provide on my website. If somebody tries to access "http://mayureshkasture.com/A/B.pdf", he should not be allowed to do that. I am aware of hotlink protection and I tried that. But when I put "pdf" into the list of extensions to be protected against direct access, links form my website to a pdf document also stopped working. As in they started opening a blank pdf document. (I am using Mozilla Firefox 3).
2. How do I restrict directory listing?
Say I have a folder called "A" in the "public_html" folder and A contains file called "B.pdf". If somebody accesses "http://mayureshkasture.com/A", he will get the list of files in that folder (B.pdf in this case). I want to restrict this listing.
Could you please answer both my queries?
Thanks in advance,
Mayuresh