overriding mod_access "require" directive

overriding mod_access "require" directive

am 07.06.2007 12:12:08 von Pete Smith

Hi,

I want to make a whole website require authentication, so I have added this
simple .htaccess file i nthe root:

Authtype Basic
AuthUserFile /home/site/.htpasswd

require valid-user

This works fine. But i want to make the robots.txt file viewable to all, so
I don't want that particular file to be subject to the 'require' directive.
How can I do this? I thought of putting the require directive in a
filesmatch block but I could not see a way of specifying "if the file does
not match '/robots.txt' then do this" scenario.

Pete

Re: overriding mod_access "require" directive

am 07.06.2007 19:45:06 von shimmyshack

On Jun 7, 11:12 am, "Pete Smith"
wrote:
> Hi,
>
> I want to make a whole website require authentication, so I have added this
> simple .htaccess file i nthe root:
>
> Authtype Basic
> AuthUserFile /home/site/.htpasswd
>
> require valid-user
>
> This works fine. But i want to make the robots.txt file viewable to all, so
> I don't want that particular file to be subject to the 'require' directive.
> How can I do this? I thought of putting the require directive in a
> filesmatch block but I could not see a way of specifying "if the file does
> not match '/robots.txt' then do this" scenario.
>
> Pete

yeah, use filesmatch with robots.txt then set
Order Allow, Deny
Allow from All
inside the block, and use
Satisy Any
-untested-
this problem has been talked about in this group before, search the
archives for more info.