Forum Moderators: phranque

Message Too Old, No Replies

How to password protect a file using .htaccess

         

shabda

5:52 pm on Mar 23, 2006 (gmt 0)

10+ Year Member



This is a pretty newbie question, but then that defines me. So How to password protect a file using .htaccess. Can anyone give the exact rule?

coopster

5:57 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, shabda.

When using per-directory override files (.htaccess) you need to use the Apache
htpasswd utility to create and edit the password file. Here is a must-read doc from Apache to get you on track:

[httpd.apache.org...]

jdMorgan

5:58 pm on Mar 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



shabda,

We can't give you the exact code, because it depends on *exactly* what you want and need to do. Also, we cannot [webmasterworld.com] write "code on demand" here -- There are simply too many requests for the limited number of volunteer contributors to handle.

Here's a good place to start: Authentication, Authorization, and Access Control [httpd.apache.org]

Jim

shabda

9:39 am on Mar 25, 2006 (gmt 0)

10+ Year Member



Right. Thanks.