linux1880 Posted May 8, 2010 Share Posted May 8, 2010 hi guys this srcipt is not redirecting url rewuest based on LAN address, do I need to add any more flag ? <?php if ($_SERVER['REMOTE_ADDR'] == '172.16.0.0') { header ('location: http://172.16.x.x:XXXX'); exit(); } else { header ('location: http://128.10.21.2:XXXX'); } ?> Link to comment https://forums.phpfreaks.com/topic/201100-this-redirection-php-script-is-not-working-in-php-52/ Share on other sites More sharing options...
satya61229 Posted May 8, 2010 Share Posted May 8, 2010 It is working for me. Just replaced port number from XXXX from something valid. Check if you have some error. error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/201100-this-redirection-php-script-is-not-working-in-php-52/#findComment-1055089 Share on other sites More sharing options...
hamza Posted May 8, 2010 Share Posted May 8, 2010 header ('location: http://128.10.21.2:XXXX'); always write Location: url L should be capital. Link to comment https://forums.phpfreaks.com/topic/201100-this-redirection-php-script-is-not-working-in-php-52/#findComment-1055112 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.