-1

I only want people to access the intranet from my IP.

I have searched different blogs as well but not get more.

I just want my website to be accessed by just my IP address to make it secure. I need an intranet that can be locked down by IP.

SkyWalker
  • 28,384
  • 14
  • 74
  • 132

1 Answers1

1

Try adding this to the .htaccess file in your web document root folder (often public_html or htdocs), changing the 999... to your IP address:

RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^999.999.999.999
RewriteRule ^ - [F]

This assumes that mod_rewrite is both installed and activated for htaccess files. If you are not sure, to check if mod_rewrite is installed, look at the list of installed modules in the output of phpinfo(); By default, mod_rewrite is not enabled for htaccess files. If you are managing your own server, open httpd.conf and make sure that the webroot directory block contains one of these lines: AllowOverride FileInfo or AllowOverride All

zx81
  • 41,100
  • 9
  • 89
  • 105