htacess protect directory

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to protect a directory and all files within it. I can add
password protection, but I just want to deny all access (other then to
the server & my ftp of course).

I've tried:

<Directory ~ formmail$>
    Order Deny,Allow
     Deny from All

but I get the error:

"<Directory not allowed here"

A pointer to the appropriate FAQ will suffice!  

(Server is appache/unix, natch).

Re: htacess protect directory

Jacqui or Pete wrote:

Quoted text here. Click to load it

I'm pretty sure you can't put a <Directory>...</Directory> in an .htaccess
file -- such constructs are only appripriate in the main Apache config

Do you have access to edit the main config files and restart httpd?

Toby A Inkster BSc (Hons) ARCS | | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink |
   | "You've got spam!"

Re: htacess protect directory

Quoted text here. Click to load it

No, it's hosted.  I guess I'll just password-protect it - thanks for the info.

Site Timeline