php - "Allow from xxx.xx.xx" in .htaccess not working -


i have code in .htaccess folder. .htaccess folder in directory: /api/.htaccess api.php location: /api/api.php

i have code in .htaccess:

<files api.php> order deny,allow deny allow 127.0.0.1 allow 122.109.32.241 allow 130.211.76.20 </files> 

my goal block every 1 ips. problem im still getting 403 error though ip on allow.

error:

forbidden don't have permission access /api/api.php on server. apache/2.2.15 (centos) server @ accountdispenser.com port 80

edit: ok after playing around method works: $_server['http_x_forwarded_for'];

but how .htaccess work method?


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -