Forum Moderators: phranque
and this is my code that does not seem to work:
<files "file.cgi">
deny from all
</files>
RewriteEngine On
RewriteCond %{HTTP_REFERER}!^http://my.site.com/producers/secure [NC]
RewriteCond %{HTTP_REFERER}!^http://my.site.com/users/secure [NC]
RewriteCond %{HTTP_REFERER}!^http://my.site.com/webmasters/secure [NC]
RewriteRule /* [my.site.com...] [R,L]
PS...I do have cgi access in all dir's so that is not the issue.
Thanmks a bunch!
I've looked at your code, and can't figure out how the various parts of it relate to what you're trying to achieve. "deny from all" is a mod_access directive, and then that's followed by your mod_rewrite stuff, which apparently controls access to a file named "/" or any number of "/" characters.
So, I don't get it. Please explain what file(name) you are trying to control access to, and under what circumstances you wish to allow and/or deny access. If access is denied, what server response do you wish to generate?
Jim
If it were just one group of users I could use:
<files "file.cgi">
AuthUserFile D:\producers\.htpasswd
AuthType Basic
AuthName "Producers"
require valid-user
</files>
but I need it to grant access to 3 .htpasswd files or users coming from those 3 directories:
users
producers
webmasters
If you use HTTP_REFERER, and this is a "paid membership" site, then you will need a 24/7 help desk to answer questions from your users who can't access the site due to problems with HTTP_REFERER.
Jim