htaccess and subfolders

This is a discussion on htaccess and subfolders within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi All I have set up a website containing pdf files in the following format: www.server.com/folder1/folder2/...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-04-2003
Andrew
 
Posts: n/a
Default htaccess and subfolders

Hi All

I have set up a website containing pdf files in the following format:

www.server.com/folder1/folder2/file1.pdf

There is a htaccess file under folder1, so if someone tries to access
it, they receive a password prompt. If they try accessing folder2,
they get the same prompt. But if they type in the direct link to the
pdf file, there is no prompt.

I've tried searching for why this happens, but have hit a brick wall.
Can anyone help me?

Thanks
Andrew
  #2 (permalink)  
Old 11-04-2003
David Efflandt
 
Posts: n/a
Default Re: htaccess and subfolders

On 3 Nov 2003 18:38:59 -0800, Andrew <AJ859@hotmail.com> wrote:
> Hi All
>
> I have set up a website containing pdf files in the following format:
>
> www.server.com/folder1/folder2/file1.pdf
>
> There is a htaccess file under folder1, so if someone tries to access
> it, they receive a password prompt. If they try accessing folder2,
> they get the same prompt. But if they type in the direct link to the
> pdf file, there is no prompt.
>
> I've tried searching for why this happens, but have hit a brick wall.
> Can anyone help me?


Check your server logs and see if the username you authenticated with
earlier was in that request. For example in this case the auth user was
"testme":

192.168.1.245 - testme [04/Nov/2003:09:37:09 -0600] "GET
/authtest/authtest2/ls.pdf HTTP/1.1" 200 18525

Your browser remembers auth credentials for that particular AuthName on
that hostname and uses them automatically, unless it fails, or browser is
closed (assuming you have not done a "save password" on your browser).
Otherwise post an example of your .htaccess (make sure auth directives are
not between <Limit> or other tags).

--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
  #3 (permalink)  
Old 11-07-2003
Andrew
 
Posts: n/a
Default Re: htaccess and subfolders

> > I have set up a website containing pdf files in the following format:
> >
> > www.server.com/folder1/folder2/file1.pdf
> >
> > There is a htaccess file under folder1, so if someone tries to access
> > it, they receive a password prompt. If they try accessing folder2,
> > they get the same prompt. But if they type in the direct link to the
> > pdf file, there is no prompt.
> >
> > I've tried searching for why this happens, but have hit a brick wall.
> > Can anyone help me?

>
> Check your server logs and see if the username you authenticated with
> earlier was in that request. For example in this case the auth user was
> "testme":
>
> 192.168.1.245 - testme [04/Nov/2003:09:37:09 -0600] "GET
> /authtest/authtest2/ls.pdf HTTP/1.1" 200 18525
>
> Your browser remembers auth credentials for that particular AuthName on
> that hostname and uses them automatically, unless it fails, or browser is
> closed (assuming you have not done a "save password" on your browser).
> Otherwise post an example of your .htaccess (make sure auth directives are
> not between <Limit> or other tags).


Hi David

I tried using a different computer which had not previously accessed
the page and I was able to bypass the username/password prompt by
going directly to the page.

I checked my server log and the auth user is not being recorded. Where
you have "testme", I just have a dash.


My htaccess file is:

AuthType Basic
AuthUserFile "(password location)"
AuthName "Restricted Access."
AuthType Basic
require valid-user
satisfy any
ErrorDocument 401 /errors/forbidden.html

Thanks for your response,
Andrew
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:01 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0