kvarnerexpress 0 Report post Posted May 6, 2005 hi, i want to restrict certain files to be directly accessed in certain directories . These files are supposed to be included in other pages , but i want to restrict people just copy pasting their url's / copy shortcuts and paste them on the browser . is this possible by using .htaccess or something else ? I am on a shared hosting account of course and don't have root access . I would like to redirect the users / or simply restrict access to the file directly . Share this post Link to post Share on other sites
mbd5882 0 Report post Posted May 6, 2005 CPanel>Hotlink Protection>EnableInput the addresses that the files can be viewed from. Just keep defult settings.I think this only works on images, Yes-I think?If you add another sub-domain, Stop it, Refresh, Start it again.That new sub-domain is not included if you add it after you enable it. Share this post Link to post Share on other sites
clagnol 0 Report post Posted May 7, 2005 Q. How can I make a directory not list certain files?A. You'll need to add the following to your .htaccess file:IndexIgnore *.gif *.jpgTo disallow Directory browsing all together, add this to your .htaccess file:Options -indexesTo show files in a slightly more beautiful fashion:Options +IndexesIndexOptions FancyIndexingTaken from this site. It doesn't specify, but the first command is only hides JPGs and GIFs. You can hide any kind of file, and if you want to hide specific files, just replace the "*.gif" and "*.jpg" with the file names. Share this post Link to post Share on other sites