Hide referrer URL using PHP redirect with HTTP query string variables

Status
Not open for further replies.

tidelow

Elite Member
Jr. VIP
Joined
Jul 11, 2017
Messages
1,812
Reaction score
1,006
Hello BHW coders,

I am trying to figure out how to do the following and am really close, but can't quite get it working how I want.

Here is an overview of what I am trying to accomplish:

1. User submits form on Site A
2. Information from the form on Site A is parsed into a URL parameter.
3. Upon submission, user is redirected to Site B, along with the query string in the URL parameter.

This is what I have so far:

Code:
<?php
    header("Location:./content/index.html?". $_SERVER['QUERY_STRING']);
    exit;
?>

Reference code:
Code:
https://stackoverflow.com/questions/4702149/php-redirect-with-http-query-string-variables

4. This works fine and I am able to successfully redirect the user to Site B with the correct URL parameters to store the data from Site A; however, I do not want Site B to be able to see the referrer URL(Site A) and do not know how to cloak this part.

From my research, I believe loading a .html page with a "no-referrer" code before redirecting to Site B could work but do not know how to implement it:
Code:
<meta name="referrer" content="no-referrer">

----------

$50 USD to whoever can solve this for me.

Thanks, and please PM if you can get accomplish this.
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top