A Little .htaccess Problem

A Little .htaccess Problem

am 23.01.2008 03:46:12 von Maria

I want to block, e.g, any IP address
of the type

208.111.154.

from my site. The following snipet in my .htaccess file
does not do it.


order allow, deny
deny from 208.111.154.
allow from all


What is wrong with it?
My site is on Powweb.
Thanks!

maria

Re: A Little .htaccess Problem

am 23.01.2008 11:43:45 von John Clancy

On Tue, 22 Jan 2008 21:46:12 -0500, maria
wrote:

>I want to block, e.g, any IP address
>of the type
>
>208.111.154.
>
>from my site. The following snipet in my .htaccess file
>does not do it.
>
>
>order allow, deny
>deny from 208.111.154.
>allow from all
>

>
>What is wrong with it?
>My site is on Powweb.
>Thanks!
>
>maria

Try order deny,allow

with "order allow,deny" the allow condition will be evaluated first,
since the allow condition allows all the deny condition would not be
evalutated

JC

Re: A Little .htaccess Problem

am 25.01.2008 01:41:33 von HansH

"John Clancy" schreef in bericht
news:cg6ep3pkehqqmp0tli18vho4ed06s7plce@4ax.com...
> On Tue, 22 Jan 2008 21:46:12 -0500, maria
>>of the type
>>208.111.154.
>>
>>from my site. The following snipet in my .htaccess file
>>does not do it.
>>
>>
>>order allow, deny
>>deny from 208.111.154.
>>allow from all
>>

>>
> Try order deny,allow
>
> with "order allow,deny" the allow condition will be evaluated first,
> since the allow condition allows all the deny condition would not be
> evalutated
>
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#ord er
Allow,Deny
First, all Allow directives are evaluated; at least one must match, or the
request is rejected. Next, all Deny directives are evaluated. If any
matches, the request is rejected. Last, any requests which do not match an
Allow or a Deny directive are denied by default.


To the OP:
There should not be a space in 'allow, deny' ...


HansH