lexington
08-29-2008, 11:34 PM
Hello, I tried googling this but didn't find exactly what I was looking for. Could anyone please provide me the code that is used in an htaccess file to prevent all direct access to files in a directory. Not hot link prevention, but disable the ability for the user to call up a file in a browser and download/open it. Thanks!
Christian
08-30-2008, 01:37 AM
This is what you want:deny from all
lexington
08-30-2008, 01:42 AM
Thanks. That seems to work but the php files can no longer grab the files locally on their end. Or do I have to redo the php files to use the local path instead of by url?
Christian
08-30-2008, 01:50 AM
Well, I suppose you could try allowing your IP access to the folder. But if the files in question are local, then I would suggest you deal with them locally and not over the http protocol.