Welcome to WebmasterWorld Guest from 54.197.116.116

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Converting ? query string to # string

   
1:05 pm on May 29, 2012 (gmt 0)

10+ Year Member



I have the issue of affiliate software creating inbound links with www.example.com/page/name/id?aff_id=22 type urls.

Is it possible to convert this using htaccess to www.example.com/page/name/id#aff_id=22 and still have the query be a real query (if you know what I mean, maintain functionality)?

From a "stopping duplicate content and actually gaining benefit by having inbound links" point of view, how best to tackle this issue?

Cheers.
1:31 pm on May 29, 2012 (gmt 0)

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



By the time you're converting anything in htaccess it's already too late, the search engine sees the same thing htaccess sees.

The next problem is the web server never sees anything after the #, only the browser, so that kills your affiliate tracking.
1:47 pm on Jun 1, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



The receiving PHP script can log the request then attempt to set a cookie and send a 301 redirect header pointing to the new URL without the parameters.

The logging script should also be able to distinguish between bots and humans.
1:51 pm on Jun 1, 2012 (gmt 0)

10+ Year Member



thanks guys.

I think we're going to go this simple rewrite rule and canonical link.

Thanks again