0

I am using the following code in my htaccess but it is not working:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} !^144\.124\.152\.167
RewriteCond %{REQUEST_URI} !/soon\.php$
RewriteRule (.*)$ /soon.php [R=302,L]

I used the following to figure out my remote_host

<?php 
echo $_SERVER['REMOTE_ADDR'];

?>

Please help

Jake
  • 3,326
  • 7
  • 39
  • 59

2 Answers2

3

Create .htaccess file and code the following lines.

order deny,allow
deny from all
allow from <Give YOUR IP>
Nitin Kaushal
  • 211
  • 1
  • 7
1

You can make a .htaccess and add the following code:

order allow,deny
allow from <Give YOUR IP>

If the deny is the last parameter then everything is denied and you can allow every client. Then you don't need the line deny from all

René Höhle
  • 26,716
  • 22
  • 73
  • 82