Redirect Visitors by IP Address

Add this php script in a php file and save in your old admin login location.

<? $administor = $_SERVER[‘REMOTE_ADDR’];
if (preg_match(“/nnn.nnn.nnn.nnn/”,$administor)) { header(‘Location: http://www.go.in’);
} else { header(‘Location: http://www.go.away’);
}; ?>

When the php file is executed, it will redirect IP’s that do not match.
This is useful if you forgot and typed in the old login location instead.

* Replace nnn.nnn.nnn.nnn with your ip address.

The following two tabs change content below.
facebook-profile-picture

Stephan Pringle

Technology Support Specialist at Sipylus
About The Author: Stephan Pringle is an Information Technology Support Specialist. He covers hardware and software and provides tips for you to troubleshoot and repair issues on your own. In his spare time, he writes articles about the State of New York on his Hackintosh and HackBook and that has helped him to become the top contributor of the New York City section of Yahoo! Answers.
facebook-profile-picture

Latest posts by Stephan Pringle (see all)

facebook-profile-picture

Stephan Pringle

About The Author: Stephan Pringle is an Information Technology Support Specialist. He covers hardware and software and provides tips for you to troubleshoot and repair issues on your own. In his spare time, he writes articles about the State of New York on his Hackintosh and HackBook and that has helped him to become the top contributor of the New York City section of Yahoo! Answers.