w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How I can restrict access to files with htaccess from all IPs except one?

Put this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

# If IP is not 192.168.1.200
RewriteCond %{REMOTE_ADDR} !^192.168.1.200$
# block access to all .php files
RewriteRule .php$ - [F,NC]




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.