Forum Moderators: phranque

Message Too Old, No Replies

Detect an incoming 302 from another site?

....and redirect it elsewhere via mod rewrite.

         

Edouard_H

4:25 pm on Sep 14, 2004 (gmt 0)

10+ Year Member



Relative to this thread [webmasterworld.com], is there a method using mod rewrite to detect and redirect a 302 from another domain? HTTP_REFERER doesn't work, eg if someone follows the G result link to the other domain the referrer is G. Is there other criteria that can be utilized in a case like this?

jdMorgan

8:32 pm on Sep 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Edouard,

There's really no way to detect that another server did a 302 to redirect the client browser to your site. The incoming request appears as a new request from that client, with no "history" -- as you surmised.

The only option I could think of was to unconditionally redirect all pages which have been stolen to a new URL -- Basically, change the names of the hijacked pages and then 301-redirect to them. If a home page was concerned, then redirect "/" to something like /index.html, or redirect it to a new subdomain.

I proposed this as a possible solution for the hijacked sites to try, but a later post in that thread indicated that someone had already tried it, and unfortunately, it did not help.

It's interesting that Google uses tracking-image-based JavaScript click-tracking in their own search results to avoid this very problem. Looking back, we should have taken that as a hint.

So, it comes down to Google and Yahoo to get their redirection-handling problems fixed. It is amazing that the problems have been allowed to persist so long already.

Jim

Edouard_H

1:02 am on Sep 15, 2004 (gmt 0)

10+ Year Member



Thanks Jim - Based on your expertise I believe I'll end my experiments. By odd coincidence the offending page started throwing a 404 while I was tinkering and I briefly thought either that I was on to something or a that request had been honored.