A Little .htaccess Problem

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.

<Limit GET>
order allow, deny
deny from 208.111.154.
allow from all
</Limit>

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

maria
Maria [ Mi, 23 Januar 2008 03:46 ] [ ID #1914629 ]

Re: A Little .htaccess Problem

On Tue, 22 Jan 2008 21:46:12 -0500, maria <maria [at] maria_de_napoli.com>
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.
>
><Limit GET>
>order allow, deny
>deny from 208.111.154.
>allow from all
></Limit>
>
>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
John Clancy [ Mi, 23 Januar 2008 11:43 ] [ ID #1914631 ]

Re: A Little .htaccess Problem

"John Clancy" <JC [at] nospam.com> schreef in bericht
news:cg6ep3pkehqqmp0tli18vho4ed06s7plce [at] 4ax.com...
> On Tue, 22 Jan 2008 21:46:12 -0500, maria <maria [at] maria_de_napoli.com>
>>of the type
>>208.111.154.
>>
>>from my site. The following snipet in my .htaccess file
>>does not do it.
>>
>><Limit GET>
>>order allow, deny
>>deny from 208.111.154.
>>allow from all
>></Limit>
>>
> 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
HansH [ Fr, 25 Januar 2008 01:41 ] [ ID #1916272 ]
Webserver » alt.apache.configuration » A Little .htaccess Problem

Vorheriges Thema: Redirect images to a script with htaccess issue.
Nächstes Thema: mod_jk 2 apache servers??