|
|
|
|
![]() ![]() |
May 6 2005, 07:55 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
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 . |
|
|
|
May 6 2005, 09:56 PM
Post
#2
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 176 Joined: 26-April 05 From: Manchester Member No.: 6,203 |
CPanel>Hotlink Protection>Enable
Input 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. |
|
|
|
May 7 2005, 10:22 AM
Post
#3
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 186 Joined: 3-April 05 From: Wichita, KS Member No.: 5,194 |
QUOTE 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 *.jpg To disallow Directory browsing all together, add this to your .htaccess file: Options -indexes To show files in a slightly more beautiful fashion: Options +Indexes IndexOptions FancyIndexing Taken 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. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th September 2008 - 07:15 AM |