Forum Moderators: phranque

Message Too Old, No Replies

Combining 'deny,allow' statements

         

keyplyr

9:40 am on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How would I combine these?

<Files ~ "\.htaccess$">
order deny,allow
deny from all
</Files>

<Files php.ini>
order allow,deny
deny from all
</Files>

<added>

This works... but do I need the quotes? Thanks.

<Files ~ "(php\.ini¦\.htaccess)$">
order deny,allow
deny from all
</Files>

jdMorgan

4:08 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure if you need the quotes or not... Try it without and let us know!

Jim

keyplyr

6:55 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




It seems the quotes are not needed.

Now, what's the purpose of that tilde? :)

Birdman

7:31 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe it's(tilde) a catchall or wildcard character so that it works in all directories.

coopster

8:29 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Extended regular expressions can also be used, with the addition of the ~ character.

Apache <Files> [httpd.apache.org]

keyplyr

8:57 pm on Jan 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks guys