Title: Redirect Php
Last modified: April 10, 2017

---

# Redirect Php

 *  Resolved [alldealbox](https://wordpress.org/support/users/alldealbox/)
 * (@alldealbox)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/redirect-php/)
 * I want all my external links to be embedded with my link.
 * For eg: [http://www.savemoneyindia.com/url.php?go=https://www.amazon.in/gp/prime/pipeline/landing](http://www.savemoneyindia.com/url.php?go=https://www.amazon.in/gp/prime/pipeline/landing)
 * Please let me know what I need to put in the url.php so that it will redirect
   to the mentioned url i.e. [https://www.amazon.in/gp/prime/pipeline/landing](https://www.amazon.in/gp/prime/pipeline/landing)
 * The blog I need help with is [http://www.alldealbox.com](http://www.alldealbox.com).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [veve2](https://wordpress.org/support/users/veve2/)
 * (@veve2)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/redirect-php/#post-9012084)
 * read this post: [https://mediatemple.net/community/products/grid/204643080/how-do-i-redirect-my-site-using-a-htaccess-file](https://mediatemple.net/community/products/grid/204643080/how-do-i-redirect-my-site-using-a-htaccess-file)
 * I hope it will be helpful.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/redirect-php/#post-9012757)
 * veve2’s suggestion of using .htaccess rewrites is a good one though it doesn’t
   exactly answer your question. You can add a reweritecond and rewriterule that
   looks for the “go” parameter and forwards requests to that URL. In such a case,
   url.php is never reached, so the base URL only needs to be the domain, there 
   is no reason to specify files, though it wouldn’t hurt anything by doing so.
 * If you really do need to go through url.php for some reason, get the URL from
   $_GET[‘go’]. Be sure to sanitize the the value before using it. You can then 
   redirect to that URL by sending a location header. `header("Location: $url");`
 * The url.php file must not generate any output to the browser in order to use 
   header().
 * In both cases the needed code resides on the savemoneyindia.com server. Yet you
   say you need help with alldealbox.com. How are these two domains related?
 *  Thread Starter [alldealbox](https://wordpress.org/support/users/alldealbox/)
 * (@alldealbox)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/redirect-php/#post-9063865)
 * These two are different domains. I found this on the first website so I use it
   as an example.
 * Thank you so much for the explanation. I now understand what i need to do.
 * Regards
    [Alldealbox](http://www.alldealbox.com/)
    -  This reply was modified 9 years, 1 month ago by [alldealbox](https://wordpress.org/support/users/alldealbox/).
    -  This reply was modified 9 years, 1 month ago by [alldealbox](https://wordpress.org/support/users/alldealbox/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Redirect Php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [alldealbox](https://wordpress.org/support/users/alldealbox/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/redirect-php/#post-9063865)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
