Answer the question
In order to leave comments, you need to log in
How to make a redirect passing the url parameter?
Hello. Such situation. There is a link with a macro parameter that is replaced when you go to the ad number in the ad network, this parameter is dynamic, respectively.
Example:
There is a link: http://site1.com/?id={creative}
Redirect from it to site2.com
When you go to the id parameter, instead of {creative} numbers are loaded (ad number).
It looks something like this: site1.com/?id=244454342
After that, it immediately goes to site2.com/.
I need to save the parameter "?id=244454342" and add it to site2.com
so that after the redirect they end up on site2.com/?id=244454342
Please help me. How can this be implemented?
Answer the question
In order to leave comments, you need to log in
Following the link: site1.com/?id=244454342
Then we take the id value using $_GET
Then we make a new link.
and do a redirect:
header("Location: http://site2.com/?id=" . $_GET['id']);
exit();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question