|
Posted by yawnmoth on 07/31/06 03:12
stevebremermn@yahoo.com wrote:
> I'm working on setting up some affiliate links on a site of mine and I
> haven't been able to get a redirect to work.
>
> The original affiliate link looks like this:
>
> http://www.exampleurl.com/index.php?ref=10
>
> Rather than use this link however I am wanting to redirect to specific
> product pages. A product page link would look like this:
>
> http://www.exampleurl.com/example-product-1-135_100.html
>
> In the past I have been able to easily set up a redirect link simply by
> combining the links with &redirect= such as:
>
> http://www.exampleurl.com/index.php?ref=10&redirect=
> http://www.exampleurl.com/example-product-1-135_100.html
>
> I understand this is probably not correct for PHP. I did play around
> with it a lot to no avail, including the use of URL encoding. Thanks
> in advance to anyone with a suggestion. :)
It's hard to say much without being able to see the relavent portions
from your index.php file, but usually, you have to do something like
header('Location: '.$_GET['redirect']) and then exit shortly there
after. $_GET['redirect'] should, of course, be checked against a white
list, or at the very least, for characters like "\r" and "\n", to
protect against http response splitting.
[Back to original message]
|