You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Lamar Seifuddin <la...@flash.net> on 2001/12/16 21:07:55 UTC

.htaccess issue???

Hello All,

This may not be based on .htaccess but
this is the only method that I know of
as a means to restrict user access:

I have a user directory www of which
all of my html files are located.

I created a index.html file that I want
to use to "login" to the rest of the directory
of html files. (all are in www dir)

questions:

1) can I do this without creating another directory
   for the "rest" of the html files?

2) if so, how do I implement this?  

3) if not, any other ideas on how to do this?

4) If someone was to bring up my website using a
   Microsoft-based server, will they get the same
   "username, password" restriction?  I don't have
   access to MS server....so I can't test it and I have
   no idea.  

thanks for your help.
most appreciated

Lamar

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


RE: .htaccess issue???

Posted by Lamar Seifuddin <la...@flash.net>.
Thanks for your reply.

I found that out.  In doing what I wanted to do,
I thought I only had access to one directory, but I
don't.  This is a webhosting server.

I can create as many directories as I want,
therefore, I put the "index.html" file in one directory
which allows me to "login" to another directory with
the .htaccess file located in it.

it worked out fine!

thanks for keeping me straight, I didn't want to swerve!

Lamar

-----Original Message-----
From: RuneImp [mailto:rune@imptech.net]
Sent: Tuesday, December 18, 2001 4:15 AM
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


----- Original Message ----- 
From: "Lamar Seifuddin" <la...@flash.net>
To: <us...@httpd.apache.org>
Sent: Sunday, December 16, 2001 12:07 PM
Subject: .htaccess issue???


Hello All,

This may not be based on .htaccess but
this is the only method that I know of
as a means to restrict user access:

I have a user directory www of which
all of my html files are located.

I created a index.html file that I want
to use to "login" to the rest of the directory
of html files. (all are in www dir)

questions:

1) can I do this without creating another directory
   for the "rest" of the html files?

2) if so, how do I implement this?  

3) if not, any other ideas on how to do this?

4) If someone was to bring up my website using a
   Microsoft-based server, will they get the same
   "username, password" restriction?  I don't have
   access to MS server....so I can't test it and I have
   no idea.  

thanks for your help.
most appreciated

Lamar


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


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


Re: .htaccess issue???

Posted by Charles Howes <cr...@vsol.net>.
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 <ru...@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


Re: .htaccess issue???

Posted by RuneImp <ru...@imptech.net>.
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


----- Original Message ----- 
From: "Lamar Seifuddin" <la...@flash.net>
To: <us...@httpd.apache.org>
Sent: Sunday, December 16, 2001 12:07 PM
Subject: .htaccess issue???


Hello All,

This may not be based on .htaccess but
this is the only method that I know of
as a means to restrict user access:

I have a user directory www of which
all of my html files are located.

I created a index.html file that I want
to use to "login" to the rest of the directory
of html files. (all are in www dir)

questions:

1) can I do this without creating another directory
   for the "rest" of the html files?

2) if so, how do I implement this?  

3) if not, any other ideas on how to do this?

4) If someone was to bring up my website using a
   Microsoft-based server, will they get the same
   "username, password" restriction?  I don't have
   access to MS server....so I can't test it and I have
   no idea.  

thanks for your help.
most appreciated

Lamar


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