Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite file access question

         

mikeschuld

10:43 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



We are blocking access by password from most of the files on a secure version of our site, but we need to have a few sub folders and some files public. Here is the current .htaccess

AuthUserFile /dev/null
AuthGroupFile /dev/null

RewriteEngine On

RewriteCond %{HTTP_REFERER}!>http://www.domain.com [NC]
RewriteCond %{HTTP_REFERER}!>http://sub2.domain.com [NC]
RewriteRule /* [sub.domain.com...] [R,L]

I need to allow access to [domain.com...] and all of its files and to [domain.com...]

Any ideas how I can do this?

jdMorgan

2:04 am on Jul 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mikeschuld,

Welcome to WebmasterWorld!

It appears that you're not using Apache mod_auth authentication/authorization -- at least not in the code you posted.

If you are using mod_auth, then password-portection is on a per-directory basis, not a per-file basis; You may need to move some files around between secure and unsecure directories.

Again, if you are using mod_auth, see the "Satisfy" directive, specifically, "Satisfy Any", for a way to get around some of the limitations of mod_auth.

Jim

mikeschuld

3:48 am on Jul 20, 2005 (gmt 0)

10+ Year Member



we aren't able to move the files around, they must be in their current locations (within the secure area somewhere) for other portions of the software we use to work correctly.

Although you did give me an idea on what I can do about the files that need to be public (just putting them all in one folder inside the main private and making that folder public).

What would I do to make a whole directory public using the .htaccess already listed above or by adding another htaccess in that directory?