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'); } ?> Quote Link to comment 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); Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.