homepage Welcome to WebmasterWorld Guest from 54.196.62.23
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Converting ? query string to # string
starchild

5+ Year Member



 
Msg#: 4458995 posted 1:05 pm on May 29, 2012 (gmt 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.

 

incrediBILL

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



 
Msg#: 4458995 posted 1:31 pm on May 29, 2012 (gmt 0)

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.

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4458995 posted 1:47 pm on Jun 1, 2012 (gmt 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.

starchild

5+ Year Member



 
Msg#: 4458995 posted 1:51 pm on Jun 1, 2012 (gmt 0)

thanks guys.

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

Thanks again

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved