htacess protect directory

  • Thread starter Jacqui or (maybe) Pete
  • Start date
J

Jacqui or (maybe) Pete

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
</Directory>

but I get the error:

"<Directory not allowed here"

A pointer to the appropriate FAQ will suffice!

(Server is appache/unix, natch).
 
T

Toby A Inkster

Jacqui said:
"<Directory not allowed here"

A pointer to the appropriate FAQ will suffice!

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
files.

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

Jacqui or maybe Pete

Toby A Inkster said:
....

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
files.

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top