Forum Moderators: phranque

Message Too Old, No Replies

affiliate link that isn't there

What is causing this?

         

Lorel

4:21 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I hope I'm posting this in the right forum.

I was checking links to my site yesterday and noticed a strange link coming from my client's site like this:

http://www.example.com/?affiliate=5574051

It is an exact up to date copy of the client's home page. It doesn't redirect to the home page. The final address is the same as the above.

I ran the above url through a server header checker and it displays a 200 so it appears to be a real page yet it's not on the server.

My client doesn't have any affiliates and I can't figure out where this link is coming from. I ran a search in google with the site command plus the word "affiliate" and he doesn't even have a page with that word on it.

Can anyone give me an idea as to what might be causing this?

[edited by: Lorel at 4:26 pm (utc) on Mar. 24, 2007]

jdMorgan

5:17 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I assume that what you mean is not that "the page isn't there," but rather, that "the page does not use or support query strings."

This is where some of the "details" of HTTP get important: "http://www.example.com/?affiliate=5574051" is not a URL, it is a URL with a query string appended. The only part of it that is important to the server (Apache) is the "http://www.example.com/" part, and only that part "must exist" in order for Apache to serve the page.

As far as the query string goes, Apache assumes that if it has any meaning, that that meaning will be interpreted by a script -- either the script that generates the page (such as PHP), or perhaps a script embedded in the page (using SSI to call a PERL script, for example).

So the point is that the requested URL does in fact exist, it's just that it's got a spurious query string attached to it.

Or perhaps by the phrase, "I was checking links to my site," you mean, "I was looking at referrers in my logs." Either way, the answer is the same, because anyone can tinker with an HTTP request's referrer, or add a query string to a link and request it with a spoofed referrer.

Do search here [google.com] for "remove query string rewriterule" if you need the code to redirect this request so as to avoid multiple SE listings and dup-content problems.

Jim

Lorel

8:26 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for the explanation JD.

I think we have tracked it down. It appears to be from a PPC campaign started months ago. Yahoo must have picked up the link, deleted all but the last link and because the site links to my site it showed up in Yahoo's list of links to my site. I'll set up a rewrite as you suggested.

Here is the code from the PPC site with the link to my client's site (names removed):

<"http://adservices6.PPCEXAMPLESITE.com/cdm?e1=laybkIjBz0yXckyZqamCzyIiDrNg3gDvkXPH4CrHhuq3rrA1uDH54MB12ei2
p2TMjHYHP0ov1zUzmMltGmhTBkcn3xQlPnNp3OFaofpKI4wJib5DZBb1de3J41gNRHyVAqfHqm1sPAFTAq4DaCp1UYeX1MAQymgmJEeNpRv
FdvlFQVrluD3IU4OFSgBnCWYAFERGYQsSotPRvF5ZFxpLptdB>http://adservices6.PPCEXAMPLESITE.com/cdm?e1=laybkIjBz0yX
ckyZqamCzyIiDrNg3gDvkXPH4CrHhuq3rrA1uDH54MB12ei2p2TMjHYHP0ov1zUzmMltGmhTBkcn3xQlPnNp3OFaofpKI4wJib5DZBb1de3
J41gNRHyVAqfHqm1sPAFTAq4DaCp1UYeX1MAQymgmJEeNpRvFdvlFQVrluD3IU4OFSgBnCWYAFERGYQsSotPRvF5ZFxpLptdB3edNJ0Aath
c0EPC2IFeVMMbjACepmFXSKWuQZUwfuOboQtxYSxKzpCtlgglk0ldlcMXkgzYRYLfqWrMsArILxvwTratVuXFpwNfGDh1EkgyCBWdjFnJps
CNTZXhqheFDw245vZ1OZyqZrhINwCIkqYhNiBkF1MEOGYpv4wF4JjDkgHE1dikTIwPRhkr1LsQqxe45rrQPbViTkKYjFxuwvdFtMyEfIwqD
qcZKLjqVlGfxFbEDlhp0AlfkNFgcXYz1HWhV2zT1dWBXYN1nh0iWMPKhUpFcvMhbeRov5kpUKQTgKXylJd0gzclDaoxZ1kLpz2IKPmUJIP5
LISaPxd3DxAdjTttXw1HDWURo4LtuMdcFtDUZlgQsr3AJipe3WgxAOvYNu5JZCdvsiGeN4Ex2IfnpqnQ5mkQCIkbejRPZ5uS2VJTButvkjB
5dPmxQIrvtAvidmJr2fwMhr03syEdxp0MSUXeIseETTpTbjohxscjSZRvCamWizmYdAnBVfAspF5dkrcSvlHGnymhpRZ3nbQZIXjeuMSfK3
ZrosbFKI0JfQFsaw2fQOLp0f3sKVgvHeEwYwVXVNdKzav2FD50iiez5ilymlA3rMuP2a22Hzot3UmctlR52b25SfylIldf3uyqWgYkovCRf
CWSeZjpNkvgf14kyjkE1StLtSxABju0YE1PN2eNtXU3KKBtC4yuuk02LQE3brGZohYNtqYWAJ4lJWB31InN&h=wcamNcID3UaDekCUM
&k=http%20www%20EXAMPLEch%20com%20affiliate%205574051&ui=381369083295512384I

[edited by: jdMorgan at 3:02 pm (utc) on Mar. 25, 2007]
[edit reason] Fixed horizontal scrolling. [/edit]

Lorel

8:40 pm on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi JD,

I found two commands you recommended to remove query strings but not sure which one to apply.

this one removes a specific query string, however I'm not sure what to put for the rewrite rule as this link doesn't originate from this site but another site.

RewriteCond %{query_string} ^(.+)\?full=1$
rewriterule ^gallery/view_photo\.php$ http://www.example.com/gallery/view_photo.php?%1 [R=301,L]

This one apparently removes all query strings. However I'm not sure if this might mess up some links coming at the site that are legitimate redirects.

RewriteCond %{query_string} .
rewriterule ^gallery/([^/]+)/(.+)$ http://www.example.com/gallery/$1/$2? [R=301,L]

Can you let me know which one to use in this situation?

jdMorgan

3:07 pm on Mar 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, it's up to you to adapt the code to suit your exact needs and test it... We're a discussion forum here, not a help desk or a coding service... :)

For the exact, single example you provided, you could use something like this in .htaccess:


RewriteCond %{QUERY_STRING} ^affiliate=5574051$
RewriteRule ^$ http://www.example.com/? [R=301,L]

That will redirect requests (only) for "www.example.com/?affiliate=5574051" to "www.example.com/"

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim