httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] content filtering by access
Date Fri, 09 Dec 2005 20:00:14 GMT
On 12/9/05, Bill Tangren <> wrote:
> Hi,
> I'm new to this forum, so I hope this question is being directed to the proper
> place.
> I run an apache server (2.0.52), and I have a number of employees here who
> access restricted pages via
> <Directory ...>
> AuthUserFile conf/htpasswd.users
> </Directory>
> I have had no problems implementing this.
> What I would like to do is to create .php web pages, in *non-restricted*
> directories, that will have content that *is* restricted to those that pass the
> test above. For example, when an employee goes to a nonrestricted page, he/she
> sees "Hi stranger!" on the page, whereas when joe public goes there, he does not.
> I'm looking at
> which could be promising, but I'm unclear on what variable to check on.
> Has anyone tried something like this, or know how I should proceed?

I can't think of any easy way to do this.  There may be some trick
involving putting the unrestricted page under the same realm and path
as the restricted pages, but I doubt that will work. There is also
mod_auth_anon, but I don't think you want to make your public users
deal with a prompt.

Assuming all these pages are php scripts, one way to handle this would
be to set a cookie in the authenticated area and check for that cookie
in the public area.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message