Welcome to WebmasterWorld Guest from 54.163.25.166

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Converting ? query string to # string

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

New User

10+ Year Member

joined:May 26, 2005
posts: 35
votes: 0


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)

Administrator from US 

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

joined:Jan 25, 2005
posts:14622
votes: 88


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 June 1, 2012 (gmt 0)

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


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 June 1, 2012 (gmt 0)

New User

10+ Year Member

joined:May 26, 2005
posts: 35
votes: 0


thanks guys.

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

Thanks again