Title: PHP redirect with url parameter
Last modified: August 20, 2016

---

# PHP redirect with url parameter

 *  [icyberia](https://wordpress.org/support/users/icyberia/)
 * (@icyberia)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/php-redirect-with-url-parameter/)
 * Hello all,
 * Not sure if this should work with wordpress or not (or it may just be my lack
   of php knowledge). I got it to work on another non-wp site I built easily so 
   I know the code is solid. It must be some sort of conflict with WP right?
 * Here is what I’ve got on my working site:
 * When a parameter is added to the url, example: [http://www.mysite.com/?id=1234](http://www.mysite.com/?id=1234)
   it then redirects to a specific URL which is defined by “1234” on another website
   via a custom API.
 * first line of code on my index.php file is
    `<?php include 'redirect.php'; ?>`
   which has all the info for the redirect its self.
 * I was thinking I would put the same line in root/index.php at the top and include
   redirect.php in the same folder and everything would work but it’s not functioning.
   It’s just returning a blank page :-/
 * Could it be because the index.php already has to call other wp files?
 * I’m completely lost. 🙁
 * _[ Please do not bump, it’s [not permitted here](http://codex.wordpress.org/Forum_Welcome#No_Bumping).]_

The topic ‘PHP redirect with url parameter’ is closed to new replies.

## Tags

 * [parameter](https://wordpress.org/support/topic-tag/parameter/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [icyberia](https://wordpress.org/support/users/icyberia/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/php-redirect-with-url-parameter/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
