Posted By

aruldave on 05/18/12


Tagged

regex php server htaccess regular Expression


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

tux-world


.htaccess script to block remote access and allow local ip


 / Published in: Apache
 

URL: http://www.totalworkflow.co.uk

The below code lets you stop access from the remote IPs excluding your local machine IP. This code can be setup where someone wants to provide an internal access and restricting the external access for the web service. - Automated Predictive Dialler Software for Call Centres

  1. RewriteEngine on
  2. RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$
  3. RewriteRule .? http://www.example.com [L]

Report this snippet  

You need to login to post a comment.