Forum Moderators: phranque

Message Too Old, No Replies

Allow a single file in .htaccess

         

phpmaven

6:00 am on Nov 28, 2005 (gmt 0)

10+ Year Member



Is it possible to allow a single file and deny the rest? For example if I'm denying files by checking the user agent, could I allow robots.txt and Deny anything else?

Thank you for your help.

jdMorgan

4:08 pm on Nov 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, the Order directive of mod_access [httpd.apache.org] allows you to specify the precedence of the Allow and Deny directives, so that Allows can override Denies or vice-versa.

Jim

phpmaven

3:57 am on Nov 29, 2005 (gmt 0)

10+ Year Member



Thank you Jim, That helped me figure it out.