Arya
Arya

Reputation: 734

URL of links on external website appended with internal website's GET

In a PHP script I am using for my personal/internal website, there is a link (using HTML <a> tag) to an external (not mine) website. The URL of my page is...

http://localhost/FunctionHome.php?Table=People_Group_Profile_24&Web_Site_Member_ID=43684331&Action=OutputProcess

...and the link to the external website is something like...

https://externalwebsite.com/Profile.aspx?id=43684331

If I click the link to the external website, then a new page opens and takes me to it, and all seems well. But, on the external website, some (not all) links seem to have the $_GET part of my URL appended to them. For example, here is a link on the external website, with my URL emboldened...

https://externalwebsite.com/Profile.aspx?tab=Transactions&id=43684331&ret=%2fFunctionHome%2ephp%3fTable%3dPeople_Group_Profile_24%26Web_Site_Member_ID%3d43684331%26Action%3dOutputProcess

How did/could the external website append my URL to their links?

How could I prevent my URL from being appended to their links?

Upvotes: 0

Views: 144

Answers (1)

jrn
jrn

Reputation: 2800

The linked website could possibly do this by reading the HTTP Referer, which would be your site.

You can prevent sending the referer by adding this to the head of your page:

<meta name="referrer" content="no-referrer" />

See Referer Policy for additional, valid meta tags.

Upvotes: 1

Related Questions