httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Howes <cr...@vsol.net>
Subject Re: .htaccess issue???
Date Wed, 19 Dec 2001 03:36:49 GMT
If you set up .htaccess even more correctly, you can allow access to a
single file while denying access to the rest, but I don't know how to
set the authentication information from a cgi or javascript program.

Here's the .htaccess file:

  AuthUserFile /home/httpd/htdocs/login/.htpasswd
  AuthGroupFile /dev/null
  AuthName "Users"
  AuthType Basic

  <Files "*">
  require valid-user
  </Files>

  <FilesMatch "^(login|logout)\.cgi$">
  Allow from all
  Satisfy any
  </FilesMatch>

It requires you to log in (require valid-user) for most files, but for a
certain set of files it will also allow you in with a valid ip address,
in this case, 'all' ip addresses.

The only method I can see is if the login cgi could print the message
"The username is xxxx, the password is yyyy" and the send you to a
protected page, causing the dialog box to pop up.

On Tue, 18 Dec 2001, RuneImp wrote:

> Date: Tue, 18 Dec 2001 04:15:09 -0800
> From: RuneImp <rune@imptech.net>
> Reply-To: users@httpd.apache.org
> To: users@httpd.apache.org
> Subject: Re: .htaccess issue???
>
> If you setup .htaccess correctly it you will be
> prompted for a login & password via a dialog box.
> You can not access any file in a directory that
> is protected by an .htaccess file. Thus you can
> not use index.html or any other file in that
> directory to "login".
>
>
> -=- RuneImp
> ImpTech - Web Design, Hosting & Computer Tech
> http://imptech.net
> rune@imptech.net

--
N Fudd -- nfudd@vsol.net
Nuns: Women who marry god.  If they divorce Him, do they get half the universe?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message