How to do a redirect with transmission of a url parameter?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
28 views
Hello. This situation. There is a link with a parameter macro, which is replaced by the transition to the number of ads in an ad network, this parameter is dynamic, respectively.
Example:
There is a link: http://site1.com/?id={creative}
Redirectin with her site2.com
During the transition, the id parameter instead of {creative} loaded figures (number of ads).
Looks like this: site1.com/?id=244454342
Then, immediately throws on site2.com/.
I need to save option "?id=244454342" and add it to site2.com
after a redirect in the end it fell on site2.com/?id=244454342
Please help. How it can be implemented?
by | 28 views

1 Answer

0 like 0 dislike
The following link: site1.com/?id=244454342
Then take the value of id using $_GET
Then make a new link.

and do a redirect:

header("Location: http://site2.com/?id=" . $_GET['id']); exit();
by

Related questions

0 like 0 dislike
1 answer
asked Jun 1, 2019 by BohdanchukVL
0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users