[CentOS] creating a htpasswd file for certain urls

Fri Mar 18 16:02:41 UTC 2011
Jerry McAllister <jerrymc at msu.edu>

On Fri, Mar 18, 2011 at 08:25:24AM -0700, Jason Slack-Moehrle wrote:

> 
> >I am in a kind of fix , i  got a website ( beta.somesite.com ) .. that
> >need to be password protected , however there are two URLs that
> >should be allowed to all with out password access. Ona cent os box 5.5
> >i am running apache .
> >
> >the entire site needs passwd protection except for the  Below  Urls .
> >
> >http://beta.somesite.com/wp-content/uploads/2011/03/large_1990782-e1299229
> >617964.jpg
> >
> >http://beta.somesite.com/?cat=592&feed=rss2
> 
> With my limited knowledge could a ReWrite rule work here?
> 
> Maybe if these 2 URL's are requested, ReWrite to a URL that isn't password
> protected that can get you to the same place these 2 could?
> 
> Anything else, Rewrite to a URL that is password protected that could get
> you to a central point?

I don't think it needs to be so tricky.   Just put the stuff that
no password is required outside of the directory tree of the stuff
that does have a password requirement.   

You may need an additional link to make it easy for your viewers
to find it.

Something like this directory tree:     

                                   _Doc Root_
                                  /          \
                                 /            \
                                /              \
 htpasswd in here->  _password required_     _no password required_
                             |                    |
                _other pw required stuff_    _other no pw required stuff

You don't have to have your whole Document_Root tree password controlled.
Just decide what needs to go in where.

////jerry
>   
> I am just thinking out loud conceptually. Maybe others could shed some
> light as well.
> 
> -Jason
> 
> 
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos