I need my PHP to direct different IPs to different webpages. I have done it but it seems to not be working, it just directs everyone to the link that’s at the bottom of the list.
Here is my PHP:
<?php $ip=$_SERVER['REMOTE_ADDR']; switch ($ip) { default: header( 'Location: /index2.html' ) ; case "192.168.2.4": header( 'Location: /people/4.html' ); case "192.168.2.15": header( 'Location: /people/2.html' ); case "192.168.2.3": header( 'Location: /people/1.html' ); case "192.168.2.13": header( 'Location: /people/1.html' ); case "192.168.2.2": header( 'Location: /people/1.html' ); case "192.168.2.9": header( 'Location: /people/1.html' ); case "192.168.2.10": header( 'Location: /people/4.html' ); case "192.168.2.6": header( 'Location: /people/5.html' ); case "192.168.2.8": header( 'Location: /people/1.html' ); case "192.168.2.5": header( 'Location: /people/3.html' ); } ?>thanks