How can I block all IP's, but allow 1 server ip in .htaccess -


i'm trying deny requests sent website, allow 2 ip-addresses.
i've learned should done .htaccess.

basically there 3 modules: website server, form-handling server , own network ip.
let's appoint following ip addresses servers:

 website server:       1.1.1.1 form-handling server: 2.2.2.2 own network:          3.3.3.3 

the .htaccess placed in public_html directory of form-handling server (2.2.2.2).

now, works:

 order deny,allow deny allow 3.3.3.3 

the form-handling server accessible own browser, form post request sent website blocked. (which good, in case)

but when edit .htaccess following, form post request still blocked:

 order deny,allow deny allow 1.1.1.1 allow 3.3.3.3 

to make sure .htaccess functional tried:

 order deny,allow deny allow 1.1.1.1 

now cannot reach form-handling server. proves .htaccess 'running'. (also, website server cannot access server tho..)

how can achieve website server has access form-handling server (and preferably me well), other visitor/server hasn't?

worth knowing: when delete these lines .htaccess, connection between website , form-handling server works beautifully.

i pretty sure htaccess ok. webserver connects form server different ip - i.e. ip internal lan between webserver , form server different.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -