I cannot get this to work. Can you help me?
I load this page in my browser:
http://www.domain.com/in.php?public=1&private=2
The following code immediately gets called to reload the page without the private value:
window.location = "http://www.domain.com/in.php?public=1";
// I've also tried window.location.href and window.location.replace
When the page loads the following code gets called:
<?=header("Location: http://www.different-domain.com")?>
So as you can see it goes like this:
domain.com -> domain.com -> different-domain.com
This is the problem:
When I look in the access log for different-domain.com, it shows someone coming from the first page load rather than the redirect. So the log shows the following referer:
http://www.domain.com/in.php?public=1&private=2
How can I fix the above so the referer will be:
http://www.domain.com/in.php?public=1
Thanks for your help.
Use a hidden post form to submit values, that may help you.
some thing like
<form method='post' action='your location' style='display:none;'>
<input type='text' value='1' name='public'>
<input type='text' value='2' name='private'>
</form>
submit this form to your location where you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.