NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] Apache htaccess auth

Dan Cech dcech at phpwerx.net
Thu Oct 6 10:21:23 EDT 2005


Hans,

If all you need is access to one subdirectory, you can add an .htaccess 
file to that subdirectory with the following lines:

Allow from 'remote system ip'
Satisfy any

This will allow the remote system to access that subdirectory without 
auth, but still require auth for every other host, and for the rest of 
the site.

You may find these links helpful:

http://lists.nyphp.org/pipermail/talk/2004-May/009750.html
http://httpd.apache.org/docs-2.0/mod/core.html#satisfy

Dan

Hans C. Kaspersetz wrote:
> I know this might be off topic a bit but I can't figure it out and I am 
> confident NYPHP is the place for AMP answers.
> 
> I am developing an application that needs to receive http responses from 
> a remote system.  Currently, the entire application lives behind 
> .htaccess Auth.  Don't want the whole world to see it.  The problem is 
> that to continue to develop/test I need to receive the responses from 
> the remote system and the remote system won't change to do the auth.
> 
> So what I would like to do is continue to protect all the files in 
> /webroot behind Auth except for one subdirectory, or I would like all 
> users from www.foo.com to access all the file in /webroot/ and make 
> everyone else authenticate.
> 
> I have been looking at the apache .htaccess stuff and haven't figured it 
> out.  Please help.
> 
> Thanks,
> Hans



More information about the talk mailing list