Title: PHP Redirect Array Help
Last modified: August 19, 2016

---

# PHP Redirect Array Help

 *  [udt123](https://wordpress.org/support/users/udt123/)
 * (@udt123)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/php-redirect-array-help/)
 *     ```
       <?php
   
       $ip_address = $_SERVER['REMOTE_ADDR'];
   
       if ($ip_address == '108.7.3.52')
       header("Location: http://myurl.com/index.html");
       else
       header("Location: http://myurl.com/page2.html");
   
       ?>
       ```
   
 * Hey guys,
 * I am trying to get the code to work for more than 1 IP and I don’t know how to
   do it. Can anybody help me out with this? Thanks in advance.
 * D

The topic ‘PHP Redirect Array Help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [udt123](https://wordpress.org/support/users/udt123/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/php-redirect-array-help/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
