homepage Welcome to WebmasterWorld Guest from 54.145.172.149
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Social Media / Facebook Marketing
Forum Library, Charter, Moderators: httpwebwitch & not2easy

Facebook Marketing Forum

    
Facebook Links now appending query strings?
And it's messing up my pages.
Bewenched

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4510190 posted 4:19 pm on Oct 20, 2012 (gmt 0)

On our product pages we like most have facebook "like" buttons. It's worked great for a couple of years now... visitor clicks like and it posts to their FB page.

Facebook would take the link and when you clicked on it on a persons page it passed through their own php parser page and then would redirect them to our site without the garbage.

Now i'm noticing that there's a bunch of their extra information being passed to our pages. We have our pages set up to 404 any link that has extra stuff to combat confusion with google and to stop some of the spam links we were getting. Seriously we were getting some with querystrings that were pornographic from international locations

What Facebook "like" links look like now is something like this:

http://www.mysite.com/products/ourpartpage.html?fb_action_ids=10151094713481914&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=288381481237582

This is really fouling things up.

 

ZydoSEO

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4510190 posted 9:44 pm on Oct 20, 2012 (gmt 0)

If your web site is hosted on Apache, using Mod_Rewrite/.htacces it would be very easy to 301 redirect any FB Likes URLs back to clean URL.

You could use something like the following in the .htaccess in the root of your web to accomplish this:

RewriteBase /

RewriteCond %{QUERY_STRING} fb_action_ids [NC, OR]
RewriteCond %{QUERY_STRING} fb_action_types [NC, OR]
RewriteCond %{QUERY_STRING} fb_source [NC, OR]
RewriteCond %{QUERY_STRING} fb_aggregation_id [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

Note: I'm just winging the above (it hasn't been tested). And I'm sure JDMorgan could come up with a much more elegant solution.

The solution above also assumes that the above code would get executed before any code you have implemented for triggering a 404 when a query string parameter is affected.

Bewenched

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4510190 posted 10:57 pm on Oct 20, 2012 (gmt 0)

That's fantastic! I do use a lot of rewrite... it's out our product pages are rendered. I'll definately test this out.
Thanks so much.

Stupid Facebook! Stupid Google!
I have all the pages set with canonical tags, but never wanted someone linking with a bunch of bs on the end of it.

lucy24

WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4510190 posted 1:08 am on Oct 21, 2012 (gmt 0)

Are all pages on this site html? If so, an alternative fix is to turn off

:: shuffling papers ::

AcceptPathInfo. It's a free-standing line in your htaccess:

AcceptPathInfo Off

The horse's mouth [httpd.apache.org] says:

A request will only be accepted if it maps to a literal path that exists. Therefore a request with trailing pathname information after the true filename such as /test/here.html/more in the above example will return a 404 NOT FOUND error.


You can only do this if there is no php or similar on your site, because dynamic pages use the extra part. The default setting-- which is officially called Default-- tells the server to ignore anything after static extensions like "html", but to retain it after dynamic extensions like "php".

In any case there's absolutely no reason for them to be putting in that extra stuff. Do they think you have special php routines that do nice stuff for requests that come in with fb_blahblah queries? Are there CMSs that really do do nice stuff? Hm.


Oh yes. Option C, if the above isn't possible:

RewriteCond %{QUERY_STRING} .
RewriteRule ^([^.]+\.html) http://www.example.com/$1? [R=301,L]

Bewenched

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4510190 posted 1:15 am on Oct 21, 2012 (gmt 0)

It's not php, it's actually asp but we map everything to .htm files since there were old static pages with that extension. 99% of the files really don't exist... they're all done through IIS and ISAPI rewrite.

Side note: Just checked FB and it appears it's only on FB pages that the link is like that. If you have one of the activity boxes on your site it's not linked that way and they resolve fine. Wonder if this is a FB "error".

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Social Media / Facebook Marketing
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